forked from mirrors/nixpkgs
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:f7c91ba622/src/cargo/core/compiler/compilation.rs (L229)
and computed from the `manifest_path`:f7c91ba622/src/cargo/core/package.rs (L163)
The manifest path is also exported via `cargo metadata` where you can see that it is absolute.
This commit is contained in:
parent
93ce3df6b5
commit
baa3d6f43b
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue