If you need to do anything to do with locales in a Nix shell, you’ll want to add the following to your environment:

LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";

See for example this repo.