rustPlatform.buildRustPackage: support debug builds
Signed-off-by: Ana Hobden <operator@hoverbear.org>
This commit is contained in:
parent
a9fc5a39c5
commit
a84cb88c47
@ -9,6 +9,10 @@ cargoBuildHook() {
|
||||
pushd "${buildAndTestSubdir}"
|
||||
fi
|
||||
|
||||
if [ "${cargoBuildType}" != "debug" ]; then
|
||||
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||
fi
|
||||
|
||||
(
|
||||
set -x
|
||||
env \
|
||||
@ -19,7 +23,7 @@ cargoBuildHook() {
|
||||
cargo build -j $NIX_BUILD_CORES \
|
||||
--target @rustTargetPlatformSpec@ \
|
||||
--frozen \
|
||||
--${cargoBuildType} \
|
||||
${cargoBuildProfileFlag} \
|
||||
${cargoBuildFlags}
|
||||
)
|
||||
|
||||
|
@ -16,7 +16,11 @@ cargoCheckHook() {
|
||||
threads=1
|
||||
fi
|
||||
|
||||
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
||||
if [ "${cargoBuildType}" != "debug" ]; then
|
||||
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||
fi
|
||||
|
||||
argstr="${cargoBuildProfileFlag} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
||||
|
||||
(
|
||||
set -x
|
||||
|
Loading…
Reference in New Issue
Block a user