Only set LOCALE_ARCHIVE on Linux

`macOS` does not have `glibcLocales`:

    error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'nix-2.90.0'
         whose name attribute is located at /nix/store/y0c95bwyvs80pm69hdd4b11pyq2ghiwh-source
/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'LOCALE_ARCHIVE' of derivation 'nix-2.90.0'

         at /nix/store/ng5qzbyv4902b4pw7g35caqw5cnmryf9-source/flake.nix:331:15:

          330|               # Required to make non-NixOS Linux not complain about missing loc

Change-Id: I4464484a0eca12b5e073d49d900b6f25886245c1
This commit is contained in:
Rebecca Turner 2024-03-14 13:44:50 -07:00
parent caded0d55e
commit 9f242fae76
Signed by: rbt
SSH key fingerprint: SHA256:HU9KTlGeHEBIp12MT4UHG0uc//NRNoJMWfzVGX3igu4

View file

@ -328,7 +328,7 @@
strictDeps = false;
# Required to make non-NixOS Linux not complain about missing locale files during configure in a dev shell
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
${if stdenv.isLinux then "LOCALE_ARCHIVE" else null} = "${pkgs.glibcLocales}/lib/locale/locale-archive";
shellHook = ''
PATH=$prefix/bin:$PATH