rustc: unset PKG_CONFIG_*

This hasn't been required to cross compile rustc since
20e24e42d4 ("rustc: 1.67.1 -> 1.68.0").
This commit is contained in:
Alyssa Ross
2025-07-17 14:19:04 +02:00
parent 6e987485eb
commit abc50135a4
@@ -82,13 +82,6 @@ stdenv.mkDerivation (finalAttrs: {
# See: https://github.com/NixOS/nixpkgs/pull/56540#issuecomment-471624656
stripDebugList = [ "bin" ];
# The Rust pkg-config crate does not support prefixed pkg-config executables[1],
# but it does support checking these idiosyncratic PKG_CONFIG_${TRIPLE}
# environment variables.
# [1]: https://github.com/rust-lang/pkg-config-rs/issues/53
"PKG_CONFIG_${builtins.replaceStrings [ "-" ] [ "_" ] stdenv.buildPlatform.rust.rustcTarget}" =
"${pkgsBuildHost.stdenv.cc.targetPrefix}pkg-config";
NIX_LDFLAGS = toString (
# when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch'
# This doesn't apply to cross-building for FreeBSD because the host