release(-lib).nix: add nixpkgsArgs parameter
This allows customizing the nixpkgs arguments by the caller. My use case
is creating a personal nixpkgs channel containing some unfree packages.
The default is still to not build unfree packages, so for nixpkgs this
is no functional change.
commitd45df036c3aac928c84b2512ddb11d1a78335fed
authorBjørn Forsman <bjorn.forsman@gmail.com>
dateMon 27 Feb 2017, 17:20 (10 years ago)
parente8351fd
pkgs/top-level/release-lib.nix+3−5
@@ -1,17 +1,15 @@
11{ supportedSystems
22, packageSet ? (import ../..)
33, scrubJobs ? true
4+, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
5+ nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
46}:
57
68with import ../../lib;
79
810rec {
911
10− # Ensure that we don't build packages marked as unfree.
11− allPackages = args: packageSet (args // {
12− config.allowUnfree = false;
13− config.inHydra = true;
14− });
12+ allPackages = args: packageSet (args // nixpkgsArgs);
1513
1614 pkgs = pkgsFor "x86_64-linux";
1715
pkgs/top-level/release.nix+3−1
@@ -15,9 +15,11 @@
1515 supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
1616, # Strip most of attributes when evaluating to spare memory usage
1717 scrubJobs ? true
18+, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
19+ nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
1820}:
1921
20−with import ./release-lib.nix { inherit supportedSystems scrubJobs; };
22+with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; };
2123
2224let
2325