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.
This commit is contained in:
parent
9dcb508f2d
commit
deb78151a9
@ -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}"}
|
||||
|
@ -39,7 +39,9 @@ rustPlatform.buildRustPackage rec {
|
||||
)
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
|
||||
# Disable tests until they can be run with --features no-self-update
|
||||
doCheck = false;
|
||||
#doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
|
||||
|
||||
postInstall = ''
|
||||
pushd $out/bin
|
||||
|
Loading…
Reference in New Issue
Block a user