diff --git a/pkgs/development/interpreters/perl/intepreter.nix b/pkgs/development/interpreters/perl/intepreter.nix index 70a0914b70a9..3d3ac6945fd3 100644 --- a/pkgs/development/interpreters/perl/intepreter.nix +++ b/pkgs/development/interpreters/perl/intepreter.nix @@ -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 '' diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index bae4ff2c93b2..de447f4e7567 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -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 []; }; })