While running nix-shell without a shell.nix file the following warning pops up:
$ nix-shell -p glibcLocales
bash: warning: setlocale: LC_TIME: cannot change locale (en_GB.UTF-8): No such file or directory
[nix-shell:~]$
If found a couple of posts which speak about setting the environment variable LOCALE_ARCHIVE_2_27 to some path. How do I set such an environment variable automatically to the correct path? Would it help to use some shell.nix file?
Edit: My locales are set as follows:
$ cat /etc/locale.conf
LANG="en_US.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_TIME="en_GB.UTF-8"
If I remove LC_TIME="en_GB.UTF-8" from /etc/locale.conf, then the warning does not show up, even if LC_TIME="en_GB.UTF-8" nix-shell -p glibcLocales is used.
Using nix-2.3.6 on Fedora 32
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable