nixpkgs/pkgs/build-support/rust
Maximilian Bosch d2694d936e
rustPlatform: don't install artifacts modified by checkPhase
While the artifacts from `buildPhase` should be used for testing as
well, it should be avoided that those are modified during `checkPhase`.

This can happen if a package is built e.g. with special
`cargoBuildFlags` that don't apply to the `checkPhase`. In that case, a
binary would be installed into `$out` without those flags since
`checkPhase` overrides the binary in the `target`-directory.

This patch copies the state of `target/release` into a temporary
location at the end of the `buildPhase` and installs the results from
that temporary directory into `$out` while `checkPhase` can continue
using the configured build-dir.

cc #91689
Closes #93119
Closes #91191
2020-07-15 20:08:30 +02:00
..
build-rust-crate buildRustCrate: set CARGO_FEATURE_* when running the build script 2020-06-13 14:09:06 +02:00
patch-registry-deps
cargo-vendor-normalise.py
carnix.nix Carnix: 0.9 -> 0.10 2019-03-26 18:54:28 +00:00
crates-io.nix treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
default-crate-overrides.nix cargo-vendor: drop 2019-09-22 20:20:20 -05:00
default.nix rustPlatform: don't install artifacts modified by checkPhase 2020-07-15 20:08:30 +02:00
fetchcargo-default-config.toml
fetchCargoTarball.nix fetchcargo: use flat tar.gz file for vendored src instead of recursive hash dir 2020-02-10 10:17:29 -05:00
fetchcrate.nix