Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3aae18f7dd60
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: df65650909d9
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 3, 2019

  1. 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.
    kolloch authored Mar 3, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    baa3d6f View commit details

Commits on Mar 6, 2019

  1. Merge pull request #56778 from kolloch/patch-2

    buildRustCrate: Make CARGO_MANIFEST_DIR absolute
    dywedir authored Mar 6, 2019
    Copy the full SHA
    df65650 View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 pkgs/build-support/rust/build-rust-crate/configure-crate.nix
Original file line number Diff line number Diff line change
@@ -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}"