diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2017-11-20 11:02:01 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2017-11-20 11:02:01 -0600 |
commit | 7ede960a27620b183f10c1a5e875d714e16ce9c0 (patch) | |
tree | df85a3df2b106f8bd35394f56f16d061cac23467 /pkgs/build-support | |
parent | eb857611378576f96022867a9fd15a7a841e518c (diff) | |
download | nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar.gz nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar.bz2 nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar.lz nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar.xz nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.tar.zst nixlib-7ede960a27620b183f10c1a5e875d714e16ce9c0.zip |
buildRustPackage: make dependencies' source writable
Some packages, such as the xcb crate, do code generation at build-time; therefore, the dependencies' source tree must be writable.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/rust/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 37ea264a53fb..57948c33bbc3 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -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 ""); |