diff options
author | Peter Kolloch <info@eigenvalue.net> | 2019-03-03 12:02:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-03 12:02:26 +0100 |
commit | baa3d6f43bd991b83d22cda36a8271f8607b8a3f (patch) | |
tree | f96a1ea5f58e6eb0bc0937c73891e49ab97b3495 /pkgs/build-support/rust | |
parent | 93ce3df6b51d19afded3b50d99d7e88912cbc810 (diff) | |
download | nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar.gz nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar.bz2 nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar.lz nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar.xz nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.tar.zst nixlib-baa3d6f43bd991b83d22cda36a8271f8607b8a3f.zip |
buildRustCrate: Make CARGO_MANIFEST_DIR absolute
While it is not obvious from the source, cargo sets CARGO_MANIFEST_DIR to an absolute directory. This let to a build problem with the popular "tera" crate using the "pest" crate. ## Cargo details The variable is set here: https://github.com/rust-lang/cargo/blob/f7c91ba6220e1b96aa14e5964e7074452f9551fb/src/cargo/core/compiler/compilation.rs#L229 and computed from the `manifest_path`: https://github.com/rust-lang/cargo/blob/f7c91ba6220e1b96aa14e5964e7074452f9551fb/src/cargo/core/package.rs#L163 The manifest path is also exported via `cargo metadata` where you can see that it is absolute.
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/configure-crate.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix index 9f499e4f5e72..b184d363d554 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -81,7 +81,7 @@ in '' export CARGO_CFG_TARGET_POINTER_WIDTH=${toString stdenv.hostPlatform.parsed.cpu.bits} export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name} - export CARGO_MANIFEST_DIR="." + export CARGO_MANIFEST_DIR=$(pwd) export DEBUG="${toString (!release)}" export OPT_LEVEL="${toString optLevel}" export TARGET="${stdenv.hostPlatform.config}" |