diff --git a/devenv.nix b/devenv.nix index cba15a9..8a94aee 100644 --- a/devenv.nix +++ b/devenv.nix @@ -6,16 +6,33 @@ }: let system = pkgs.stdenv.system; pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system}; + hasGlibcLocales = pkgs.stdenv.hostPlatform.isLinux && pkgs.stdenv.hostPlatform.isGnu; + devLocales = + if hasGlibcLocales + then + pkgs.glibcLocales.override { + allLocales = false; + locales = [ + "en_GB.UTF-8/UTF-8" + "en_US.UTF-8/UTF-8" + ]; + } + else null; in { # https://devenv.sh/basics/ - env = { - # Parallel deps compilation - MIX_OS_DEPS_COMPILE_PARTITION_COUNT = 8; - # Enable JS/LV debugging (required?) - NODE_ENV = "development"; - # Delay npm dependency resolution to reduce rushed supply-chain updates. - NPM_CONFIG_MIN_RELEASE_AGE = "7"; - }; + env = + { + LANG = "en_GB.UTF-8"; + # Parallel deps compilation + MIX_OS_DEPS_COMPILE_PARTITION_COUNT = 8; + # Enable JS/LV debugging (required?) + NODE_ENV = "development"; + # Delay npm dependency resolution to reduce rushed supply-chain updates. + NPM_CONFIG_MIN_RELEASE_AGE = "7"; + } + // lib.optionalAttrs hasGlibcLocales { + LOCALE_ARCHIVE = "${devLocales}/lib/locale/locale-archive"; + }; # https://devenv.sh/packages/ packages = with pkgs;