buildRustPackage: Avoid altering .cargo/config
in source
This commit is contained in:
parent
b53e237ef6
commit
626ccd7121
1 changed files with 7 additions and 8 deletions
|
@ -72,14 +72,6 @@ in stdenv.mkDerivation (args // {
|
|||
substitute $config .cargo/config \
|
||||
--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'
|
||||
[target."${stdenv.buildPlatform.config}"]
|
||||
"linker" = "${ccForBuild}"
|
||||
|
@ -89,6 +81,13 @@ in stdenv.mkDerivation (args // {
|
|||
''}
|
||||
EOF
|
||||
cat .cargo/config
|
||||
|
||||
unset cargoDepsCopy
|
||||
export RUST_LOG=${logLevel}
|
||||
'' + (args.postUnpack or "");
|
||||
|
||||
configurePhase = args.configurePhase or ''
|
||||
runHook preConfigure
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue