diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index 1236f7b79369..efaff0805e95 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -367,10 +367,6 @@ buildStdenv.mkDerivation { "-l" ]; - # if not explicitly set, wrong cc from buildStdenv would be used - HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc"; - HOST_CXX = "${llvmPackagesBuildBuild.stdenv.cc}/bin/c++"; - nativeBuildInputs = [ autoconf cargo @@ -643,7 +639,12 @@ buildStdenv.mkDerivation { makeFlags = extraMakeFlags; separateDebugInfo = enableDebugSymbols; enableParallelBuilding = true; - env = lib.optionalAttrs stdenv.hostPlatform.isMusl { + env = { + # if not explicitly set, wrong cc from buildStdenv would be used + HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc"; + HOST_CXX = "${llvmPackagesBuildBuild.stdenv.cc}/bin/c++"; + } + // lib.optionalAttrs stdenv.hostPlatform.isMusl { # Firefox relies on nonstandard behavior of the glibc dynamic linker. It re-uses # previously loaded libraries even though they are not in the rpath of the newly loaded binary. # On musl we have to explicitly set the rpath to include these libraries.