forked from mirrors/nixpkgs
Move pkgsOrig outside applyGlobalOverrides and provide it as argument.
This commit is contained in:
parent
5f4cb91a1c
commit
f9a29887fe
|
@ -90,15 +90,18 @@ let
|
||||||
# (un-overriden) set of packages, allowing packageOverrides
|
# (un-overriden) set of packages, allowing packageOverrides
|
||||||
# attributes to refer to the original attributes (e.g. "foo =
|
# attributes to refer to the original attributes (e.g. "foo =
|
||||||
# ... pkgs.foo ...").
|
# ... pkgs.foo ...").
|
||||||
pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {}));
|
pkgs = applyGlobalOverrides pkgsInit (config.packageOverrides or (pkgs: {}));
|
||||||
|
|
||||||
mkOverrides = pkgsOrig: overrides: overrides //
|
mkOverrides = pkgsOrig: overrides: overrides //
|
||||||
(lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig));
|
(lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig));
|
||||||
|
|
||||||
|
# The un-overriden packages, passed to `overrider'.
|
||||||
|
pkgsInit = pkgsFun pkgs {};
|
||||||
|
|
||||||
# Return the complete set of packages, after applying the overrides
|
# Return the complete set of packages, after applying the overrides
|
||||||
# returned by the `overrider' function (see above). Warning: this
|
# returned by the `overrider' function (see above). Warning: this
|
||||||
# function is very expensive!
|
# function is very expensive!
|
||||||
applyGlobalOverrides = overrider:
|
applyGlobalOverrides = pkgsOrig: overrider:
|
||||||
let
|
let
|
||||||
# Call the overrider function. We don't want stdenv overrides
|
# Call the overrider function. We don't want stdenv overrides
|
||||||
# in the case of cross-building, or otherwise the basic
|
# in the case of cross-building, or otherwise the basic
|
||||||
|
@ -106,9 +109,6 @@ let
|
||||||
# adapter.
|
# adapter.
|
||||||
overrides = mkOverrides pkgsOrig (overrider pkgsOrig);
|
overrides = mkOverrides pkgsOrig (overrider pkgsOrig);
|
||||||
|
|
||||||
# The un-overriden packages, passed to `overrider'.
|
|
||||||
pkgsOrig = pkgsFun pkgs {};
|
|
||||||
|
|
||||||
# The overriden, final packages.
|
# The overriden, final packages.
|
||||||
pkgs = pkgsFun pkgs overrides;
|
pkgs = pkgsFun pkgs overrides;
|
||||||
in pkgs;
|
in pkgs;
|
||||||
|
|
Loading…
Reference in a new issue