mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-09 13:43:50 +00:00
Swap conditions of stdenvOverrides to prevent infinite loops while evaluating stdenvCross.
While evaluating the derivation of xbursttools: the condition `pkgs.stdenv ? overrides` causes the evaluation of `stdenvCross`. This evaluation comes too early during the execution, as it prevents the resolution of names such as `pkgs.lib`, and `stdenvAdapaters.makeStdenvCross`, which we want to take from `pkgs` instead of `self` in following patches. By swapping the conditions, we effectively make the resolution of `pkgs.lib` and `stdenvAdapaters.makeStdenvCross` possible through the pkgs attribute.
This commit is contained in:
parent
8d355b8d85
commit
7f3a4f4287
@ -100,7 +100,7 @@ let
|
|||||||
# otherwise the basic overrided packages will not be built with the
|
# otherwise the basic overrided packages will not be built with the
|
||||||
# crossStdenv adapter.
|
# crossStdenv adapter.
|
||||||
stdenvOverrides = pkgs:
|
stdenvOverrides = pkgs:
|
||||||
lib.optionalAttrs (pkgs.stdenv ? overrides && crossSystem == null)
|
lib.optionalAttrs (crossSystem == null && pkgs.stdenv ? overrides)
|
||||||
(pkgs.stdenv.overrides pkgs);
|
(pkgs.stdenv.overrides pkgs);
|
||||||
|
|
||||||
# The un-overriden packages, passed to `overrider'.
|
# The un-overriden packages, passed to `overrider'.
|
||||||
|
Loading…
Reference in New Issue
Block a user