separateDebugInfo: use NIX_RUSTFLAGS

Setting RUSTFLAGS causes Cargo to ignore other ways of configuring
flags, including the target-specific RUSTFLAGS options.  This broke
pkgsCross.musl64.crosvm, and was surprising to users.

Fixes: https://github.com/NixOS/nixpkgs/pull/261727
This commit is contained in:
Alyssa Ross 2023-11-15 13:38:43 +01:00 committed by Adam Joseph
parent 8929ba838f
commit 52a13b8125

View File

@ -1,7 +1,7 @@
export NIX_SET_BUILD_ID=1
export NIX_LDFLAGS+=" --compress-debug-sections=zlib"
export NIX_CFLAGS_COMPILE+=" -ggdb -Wa,--compress-debug-sections"
export RUSTFLAGS+=" -g"
export NIX_RUSTFLAGS+=" -g"
fixupOutputHooks+=(_separateDebugInfo)