Nix Shell and Locales
From here. Often nix-shell
invocations have the following issue:
1bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
The fix is in two parts:
1# Install glibc
2nix-env -i glibc-locales
Then use it in the shellHook
as:
1shellHook = ''
2 # Locale
3 export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive
4'';
Or directly as export LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"
Comments