Skip to content

Commit

Permalink
DONTDROP haskellPackages.mkDerivation: Fix `cannot coerce null to a s…
Browse files Browse the repository at this point in the history
…tring`

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
```
  • Loading branch information
Artturin committed Dec 6, 2024
1 parent f1f6424 commit 1f0acb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/haskell-modules/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.hostPlatform.libc == "glibc" && buildPackages.glibcLocales != null) "${buildPackages.glibcLocales}/lib/locale/locale-archive";
"NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
"NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";
# TODO: is this still valid?
Expand Down

0 comments on commit 1f0acb0

Please sign in to comment.