diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 14afa3dfe6b44e..079698ebd13fa3 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -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?