diff options
author | Flakebi <flakebi@t-online.de> | 2020-06-27 11:50:42 +0200 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-07-03 08:53:57 +1000 |
commit | deb78151a9438fb202842d9dbe348365cfd767e0 (patch) | |
tree | 480984365bf13654e40f9158ade03a6d7ae53598 /pkgs/build-support | |
parent | 9dcb508f2d0ce702d8e7aded53e331aab4a33625 (diff) |
buildRustPackage: fix cargoBuildFlags
When features were supplied in cargoBuildFlags, the binaries were built with these features enabled. Unless checking was disabled, `cargo test` was executed without these build flags, meaning the binaries were rebuilt and overwritten without the specified features. Fix this bug by running tests after the installation phase.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/rust/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 8d3a7ba6929c1..9e9f2cb4e3bc7 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -199,7 +199,7 @@ stdenv.mkDerivation (args // { -executable ! \( -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \)) ''; - checkPhase = args.checkPhase or (let + installCheckPhase = args.checkPhase or (let argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${rustTarget} --frozen"; in '' ${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"} |