Subject: Wrong locale settings for guix-daemon causes confusing error

From: Marius Bakke <[email-masked]>
Date: Thu, 10 Dec 2020 23:30:37 +0100

Hello,

User sss2 reported on #guix[0] that running guix-daemon with an invalid
locale causes the following error:

# guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git   77667e2
Computing Guix derivation for 'x86_64-linux'... |
guix pull: error: got unexpected path `hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and' from substituter

[0] https://logs.guix.gnu.org/guix/2020-12-10.log#221732

I can reproduce it on a foreign distro by adding this to the systemd
service file:

  Environment='GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en-US.utf8

(note the en-US typo)

This seems to be a recent regression, as I could not reproduce with an
old guix-daemon (I believe beba9ff82123c4a82721b2ed14df2c7576e22e85).