Commit graph

10 commits

Author SHA1 Message Date
Ben Siraphob acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
zowoq 473536e3b5 buildRustPackage: remove platform.all from packages 2020-08-16 12:48:18 +10:00
Cole Helbling 22fdfc7fbc
rustfmt: fix build with rustc 1.45.0
Due to a recent change in rustc 1.45.0, rustfmt now requires two
additional environment variables to be set in order to build
successfully: `CFG_RELEASE` and `CFG_RELEASE_CHANNEL`.
2020-07-21 10:32:59 -07:00
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
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth 7bb6b373ab treewide: name -> pname (#67513) 2019-08-31 07:41:22 -04:00
Bas van Dijk 06734a93e9 rustfmt: fix build on aarch64 2019-08-19 15:23:41 +02:00
Bas van Dijk 4e5d4d5509 rustfmt: enable tests 2019-08-19 15:09:15 +02:00
Bas van Dijk dc374218c9
rustfmt: make sure to test rustfmt instead of rustc
Co-Authored-By: symphorien <symphorien@users.noreply.github.com>
2019-08-19 12:54:40 +02:00
Bas van Dijk 16cb2611d9 rustfmt: use the src as defined by the git submodule in rust
This commit makes sure rustc and rustfmt are compatible by setting
rustfmt's src to the rustfmt git submodule as defined in:

https://github.com/rust-lang/rust/tree/1.36.0/src/tools
2019-08-16 12:54:05 +02:00