summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2017-02-27 17:20:25 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-04-11 19:43:34 +0200
commitd45df036c3aac928c84b2512ddb11d1a78335fed (patch)
tree2dddc91d5b19e6d567b8f58de765ad434d800c9d /pkgs
parente8351fd30519e1b268eeb006c5b18cdb7f73e7fa (diff)
downloadnixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar.gz
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar.bz2
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar.lz
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar.xz
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.tar.zst
nixlib-d45df036c3aac928c84b2512ddb11d1a78335fed.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/top-level/release-lib.nix8
-rw-r--r--pkgs/top-level/release.nix4
2 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix
index a6e574a7d11a..59d571f0bd18 100644
--- a/pkgs/top-level/release-lib.nix
+++ b/pkgs/top-level/release-lib.nix
@@ -1,17 +1,15 @@
 { supportedSystems
 , packageSet ? (import ../..)
 , scrubJobs ? true
+, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
+  nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
 }:
 
 with import ../../lib;
 
 rec {
 
-  # Ensure that we don't build packages marked as unfree.
-  allPackages = args: packageSet (args // {
-    config.allowUnfree = false;
-    config.inHydra = true;
-  });
+  allPackages = args: packageSet (args // nixpkgsArgs);
 
   pkgs = pkgsFor "x86_64-linux";
 
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index 7c6954564d0b..66ff9a9e6b98 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -15,9 +15,11 @@
   supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
 , # Strip most of attributes when evaluating to spare memory usage
   scrubJobs ? true
+, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
+  nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
 }:
 
-with import ./release-lib.nix { inherit supportedSystems scrubJobs; };
+with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; };
 
 let