Skip to content

Commit

Permalink
release(-lib).nix: add nixpkgsArgs parameter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bjornfor committed Apr 11, 2017
1 parent e8351fd commit d45df03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions 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";

Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/release.nix
Expand Up @@ -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

Expand Down

0 comments on commit d45df03

Please sign in to comment.