I had some issue trying to run a program. It gave hGetContents: invalid argument error. After googling around I came acroos
the following thread.
Looking at the thread it seems the issue is related to the value of LOCALE_CACHE environment variable. The thread links to a manual page that provides the solution for nixpkgs on Non-NixOS platform. NixOS wiki has a page on the topic which agains only shows the solution for Non-NixOS platforms.
Looking around the options in nixos, I came across i18n.glibcLocales and tried setting i18n.glibcLocales = pkgs.glibcLocales. Unfortunately it didn’t solve the issue.