mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #31912 from ttuegel/rust/rw-source
buildRustPackage: make dependencies' source writable
This commit is contained in:
commit
471dc983cd
1 changed files with 7 additions and 1 deletions
|
@ -43,6 +43,10 @@ in stdenv.mkDerivation (args // {
|
|||
postUnpack = ''
|
||||
eval "$cargoDepsHook"
|
||||
|
||||
unpackFile "$cargoDeps"
|
||||
cargoDepsCopy=$(stripHash $(basename $cargoDeps))
|
||||
chmod -R +w "$cargoDepsCopy"
|
||||
|
||||
mkdir .cargo
|
||||
cat >.cargo/config <<-EOF
|
||||
[source.crates-io]
|
||||
|
@ -50,9 +54,11 @@ in stdenv.mkDerivation (args // {
|
|||
replace-with = 'vendored-sources'
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = '$cargoDeps'
|
||||
directory = '$(pwd)/$cargoDepsCopy'
|
||||
EOF
|
||||
|
||||
unset cargoDepsCopy
|
||||
|
||||
export RUST_LOG=${logLevel}
|
||||
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
'' + (args.postUnpack or "");
|
||||
|
|
Loading…
Reference in a new issue