nixpkgs/pkgs/development/tools/rust
Maximilian Bosch 6b23cfe689
rustPlatform: add buildAndTestSubdir-argument
There are several tarballs (such as the `rust-lang/rust`-source) with a
`Cargo.toml` at root and several sub-packages (with their own Cargo.toml)
without using workspaces[1].

In such a case it's needed to move into a subdir to only build the
specified sub-package (e.g. `rustfmt` or `rsl`), however the artifacts
are at `/target` in the root-dir of the build environment. This breaks
the build since `buildRustPackage` searches for executables in `target`
(which is at the build-env's root) at the end of the `buildPhase`.

With the optional `buildAndTestSubdir`-argument, the builder moves into
the specified subdir using `pushd`/`popd` during `buildPhase` and
`checkPhase`.

Also moved the logic to find executables and libs to the end of the `buildPhase`
from a custom `postBuild`-hook to fix packages with custom `build`/`install`-procedures
such as `uutils-coreutils`.

[1] https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
2020-05-13 01:47:17 +02:00
..
bindgen rust-bindgen: 0.53.1 -> 0.53.2 2020-03-12 06:10:16 +00:00
cargo-asm treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-bloat cargo-bloat: 0.9.2 -> 0.9.3 2020-04-09 13:43:55 +00:00
cargo-crev cargo-crev: 0.16.0 -> 0.16.1 2020-02-28 22:46:27 +01:00
cargo-deny cargo-deny: 0.6.6 -> 0.6.7 2020-05-06 23:50:37 +02:00
cargo-expand cargo-expand: 0.5.0 -> 0.6.0 2020-04-24 09:40:43 +08:00
cargo-fuzz treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-geiger treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-generate treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-inspect treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-make cargo-make: 0.30.6 -> 0.30.7 2020-05-08 00:00:24 +02:00
cargo-raze treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-sweep treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-udeps cargo-udeps: 0.1.10 -> 0.1.11 2020-05-02 04:14:06 +00:00
cargo-watch treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cargo-xbuild cargo-xbuild: 0.5.28 -> 0.5.29 2020-05-03 19:07:00 +02:00
cbindgen rust-cbindgen: 0.13.2 -> 0.14.2 2020-05-04 06:27:22 +00:00
maturin treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
racer treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
racerd rustracerd: improve robustness of installPhase 2020-04-12 14:06:08 -07:00
rust-analyzer rustPlatform: add buildAndTestSubdir-argument 2020-05-13 01:47:17 +02:00
rustup treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
svd2rust treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00