mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
buildRustPackage: fix cargo flag for release/debug build (#61521)
Previous behavior did not actually allow for "debug" build as it would try to pass --debug to cargo, which is not a valid flag.
This commit is contained in:
parent
4bcc6e11d3
commit
4403d44763
@ -46,7 +46,6 @@ let
|
||||
ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
|
||||
cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
|
||||
releaseDir = "target/${stdenv.hostPlatform.config}/${buildType}";
|
||||
|
||||
in stdenv.mkDerivation (args // {
|
||||
inherit cargoDeps;
|
||||
|
||||
@ -104,7 +103,7 @@ in stdenv.mkDerivation (args // {
|
||||
"CC_${stdenv.hostPlatform.config}"="${ccForHost}" \
|
||||
"CXX_${stdenv.hostPlatform.config}"="${cxxForHost}" \
|
||||
cargo build \
|
||||
--${buildType} \
|
||||
${stdenv.lib.optionalString (buildType == "release") "--release"} \
|
||||
--target ${stdenv.hostPlatform.config} \
|
||||
--frozen ${concatStringsSep " " cargoBuildFlags}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user