buildRustPackage: Avoid altering `.cargo/config` in source
This commit is contained in:
parent
b53e237ef6
commit
626ccd7121
|
@ -72,14 +72,6 @@ in stdenv.mkDerivation (args // {
|
||||||
substitute $config .cargo/config \
|
substitute $config .cargo/config \
|
||||||
--subst-var-by vendor "$(pwd)/$cargoDepsCopy"
|
--subst-var-by vendor "$(pwd)/$cargoDepsCopy"
|
||||||
|
|
||||||
unset cargoDepsCopy
|
|
||||||
|
|
||||||
export RUST_LOG=${logLevel}
|
|
||||||
'' + (args.postUnpack or "");
|
|
||||||
|
|
||||||
configurePhase = args.configurePhase or ''
|
|
||||||
runHook preConfigure
|
|
||||||
mkdir -p .cargo
|
|
||||||
cat >> .cargo/config <<'EOF'
|
cat >> .cargo/config <<'EOF'
|
||||||
[target."${stdenv.buildPlatform.config}"]
|
[target."${stdenv.buildPlatform.config}"]
|
||||||
"linker" = "${ccForBuild}"
|
"linker" = "${ccForBuild}"
|
||||||
|
@ -89,6 +81,13 @@ in stdenv.mkDerivation (args // {
|
||||||
''}
|
''}
|
||||||
EOF
|
EOF
|
||||||
cat .cargo/config
|
cat .cargo/config
|
||||||
|
|
||||||
|
unset cargoDepsCopy
|
||||||
|
export RUST_LOG=${logLevel}
|
||||||
|
'' + (args.postUnpack or "");
|
||||||
|
|
||||||
|
configurePhase = args.configurePhase or ''
|
||||||
|
runHook preConfigure
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue