nixpkgs/pkgs/development
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
..
androidndk-pkgs
arduino treewide: remove the-kenny from maintainers 2020-05-09 10:28:57 +01:00
beam-modules
bower-modules/generic
chez-modules
compilers rustPlatform: add buildAndTestSubdir-argument 2020-05-13 01:47:17 +02:00
coq-modules Coq: refactoring of mathcomp packages (#86088) 2020-05-09 07:47:47 +02:00
dhall-modules
dotnet-modules python-language-server: init at 2020-04-24 2020-05-09 09:41:14 +02:00
em-modules/generic
go-modules
go-packages
guile-modules
haskell-modules haskell-hlint: drop obsolete override for ghc-8.10.x 2020-05-08 21:11:47 +02:00
idris-modules
interpreters Merge pull request #87138 from lukegb/fix-php 2020-05-09 15:40:35 +02:00
java-modules
libraries Merge master into staging-next 2020-05-10 09:43:48 +02:00
lisp-modules
lua-modules
misc
mobile
node-packages treewide: per RFC45, remove more unquoted URLs 2020-05-08 15:20:47 +02:00
ocaml-modules treewide: per RFC45, remove more unquoted URLs 2020-05-08 15:20:47 +02:00
perl-modules
pharo
pure-modules
python-modules Merge master into staging-next 2020-05-10 09:43:48 +02:00
r-modules
ruby-modules
tools rustPlatform: add buildAndTestSubdir-argument 2020-05-13 01:47:17 +02:00
web postman: 7.21.2 -> 7.23.0 2020-05-07 11:22:30 -07:00