stdenv: fix stagesNative

This commit is contained in:
uri 2023-06-29 15:23:02 +10:00
parent 8066e45fb3
commit f829b24045
2 changed files with 9 additions and 4 deletions

View file

@ -195,9 +195,11 @@ stdenv.mkDerivation (rec {
substituteInPlace "$out"/lib/perl5/*/*/Config_heavy.pl \
--replace "${libcInc}" /no-such-path \
--replace "${
if stdenv.hasCC then stdenv.cc.cc else "/no-such-path"
if stdenv.hasCC then stdenv.cc else "/no-such-path"
}" /no-such-path \
--replace "${stdenv.cc}" /no-such-path \
--replace "${
if stdenv.hasCC && stdenv.cc.cc != null then stdenv.cc.cc else "/no-such-path"
}" /no-such-path \
--replace "$man" /no-such-path
'' + lib.optionalString crossCompiling
''

View file

@ -152,7 +152,10 @@ in
inherit config overlays;
stdenv = makeStdenv {
inherit (prevStage) cc fetchurl;
} // { inherit (prevStage) fetchurl; };
overrides = prev: final: { inherit (prevStage) fetchurl; };
} // {
inherit (prevStage) fetchurl;
};
})
# Using that, build a stdenv that adds the xz command (which most systems
@ -162,7 +165,7 @@ in
stdenv = makeStdenv {
inherit (prevStage.stdenv) cc fetchurl;
extraPath = [ prevStage.xz ];
overrides = self: super: { inherit (prevStage) xz; };
overrides = self: super: { inherit (prevStage) fetchurl xz; };
extraNativeBuildInputs = if localSystem.isLinux then [ prevStage.patchelf ] else [];
};
})