Inject gcc path into makewrapper script

This commit is contained in:
Jacek Galowicz 2021-12-09 12:27:29 +01:00 committed by Jacek Galowicz
parent 2bc7345064
commit e7c70ce5c8
2 changed files with 5 additions and 3 deletions

@ -1,9 +1,9 @@
{ lib, coreutils, python3, gcc, writeText, writeScript, runCommand, makeBinaryWrapper }:
let
env = { nativeBuildInputs = [ makeBinaryWrapper gcc ]; };
env = { nativeBuildInputs = [ makeBinaryWrapper ]; };
envCheck = runCommand "envcheck" env ''
cc -o $out ${./envcheck.c}
${gcc}/bin/cc -o $out ${./envcheck.c}
'';
makeGoldenTest = testname: runCommand "test-wrapper_${testname}" env ''
mkdir -p /tmp/foo

@ -608,7 +608,9 @@ in
makeBinaryWrapper = makeSetupHook {
deps = [ dieHook ];
} ../build-support/setup-hooks/make-binary-wrapper.sh;
} (runCommand "make-binary-wrapper.sh" {} ''
substitute ${../build-support/setup-hooks/make-binary-wrapper.sh} $out --replace " cc " " ${gcc}/bin/cc "
'');
makeModulesClosure = { kernel, firmware, rootModules, allowMissing ? false }:
callPackage ../build-support/kernel/modules-closure.nix {