mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
cc-wrapper: Hardcode path to mktemp
and rm
if possible
These commands are run after the path backup is restored Co-authored-by: IlyaNiklyaev <ilya.niklyaev@gmail.com>
This commit is contained in:
parent
e056730f13
commit
985072e2ce
@ -251,8 +251,8 @@ if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then
|
||||
fi
|
||||
|
||||
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
|
||||
responseFile=$(mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX")
|
||||
trap 'rm -f -- "$responseFile"' EXIT
|
||||
responseFile=$(@mktemp@ "${TMPDIR:-/tmp}/cc-params.XXXXXX")
|
||||
trap '@rm@ -f -- "$responseFile"' EXIT
|
||||
printf "%q\n" \
|
||||
${extraBefore+"${extraBefore[@]}"} \
|
||||
${params+"${params[@]}"} \
|
||||
|
@ -741,6 +741,8 @@ stdenvNoCC.mkDerivation {
|
||||
# TODO(@sternenseemann): rename env var via stdenv rebuild
|
||||
shell = getBin runtimeShell + runtimeShell.shellPath or "";
|
||||
gnugrep_bin = optionalString (!nativeTools) gnugrep;
|
||||
rm = if nativeTools then "rm" else lib.getExe' coreutils "rm";
|
||||
mktemp = if nativeTools then "mktemp" else lib.getExe' coreutils "mktemp";
|
||||
# stdenv.cc.cc should not be null and we have nothing better for now.
|
||||
# if the native impure bootstrap is gotten rid of this can become `inherit cc;` again.
|
||||
cc = optionalString (!nativeTools) cc;
|
||||
|
Loading…
Reference in New Issue
Block a user