diff options
author | John Ericson <git@JohnEricson.me> | 2018-10-23 20:21:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 20:21:48 -0400 |
commit | b71389aefbd9119ee9aaa454d2c8eae0f870b9f9 (patch) | |
tree | 0c913c902e431529b81b5d0cd133c979ec61f143 /pkgs | |
parent | b41f8936b9326c10178e48ddc8f94c3c17af22a2 (diff) | |
parent | a5c4642ddf03f792c29764c53725f9b04e06decd (diff) | |
download | nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar.gz nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar.bz2 nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar.lz nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar.xz nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.tar.zst nixlib-b71389aefbd9119ee9aaa454d2c8eae0f870b9f9.zip |
Merge pull request #47430 from roberth/nixpkgs-extend
pkgs.extend for adding overlays
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/top-level/stage.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index d0fb885dc747..37724a870a30 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -56,7 +56,7 @@ , # A list of overlays (Additional `self: super: { .. }` customization # functions) to be fixed together in the produced package set overlays -}: +} @args: let stdenvAdapters = self: super: @@ -159,6 +159,19 @@ let }; }; }; + + # Extend the package set with zero or more overlays. This preserves + # preexisting overlays. Prefer to initialize with the right overlays + # in one go when calling Nixpkgs, for performance and simplicity. + appendOverlays = extraOverlays: + import ./stage.nix (args // { overlays = args.overlays ++ extraOverlays; }); + + # Extend the package set with a single overlay. This preserves + # preexisting overlays. Prefer to initialize with the right overlays + # in one go when calling Nixpkgs, for performance and simplicity. + # Prefer appendOverlays if used repeatedly. + extend = f: self.appendOverlays [f]; + }; # The complete chain of package set builders, applied from top to bottom. |