haskellPackages.mkDerivation: Fix cannot coerce null to a string

https://www.github.com/NixOS/nixpkgs/issues/362272

Fixes

```
$ nix repl --file . --system aarch64-darwin
nix-repl> pkgsCross.aarch64-multiplatform.haskellPackages.ghc-lib.env
error:
       … while evaluating attribute 'LOCALE_ARCHIVE' of derivation 'ghc-shell-for-ghc-lib-aarch64-unknown-linux-gnu-9.6.6.20240701-aarch64-unknown-linux-gnu'
       error: cannot coerce null to a string: null
```
This commit is contained in:
Artturin 2024-12-06 03:26:53 +02:00
parent 40e543da83
commit 266e22539b

View File

@ -802,7 +802,7 @@ stdenv.mkDerivation ({
buildInputs =
otherBuildInputsSystem;
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
LOCALE_ARCHIVE = lib.optionalString (stdenv.buildPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
"NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
"NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";
# TODO: is this still valid?