Open sarahec opened 5 days ago
Good idea. Will do now!
@sarahec this is as simple as adding a default.nix
with flake-compat, right?
(import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5";
}
) {
src = ./.;
}).defaultNix
That default.nix loads flake-compat for use in your flake.
I'm talking about the other way around: creating a straight derivation (e.g. package.nix) that could be used by itself or incorporated with callPackage(path-to-derivation)
Ahh, I see.
Since not everyone uses flakes, why not package your code in a derivation (using stdenv for the build phases)? You can use
callPackage(path-to-derivation)
to import it into the flake and ship both.