Skip to content

Commit

Permalink
Set proper locale inside nix-shell
Browse files Browse the repository at this point in the history
This should prevent error:

  Failed to configure LOCALE for invalid locale name.

which prevented redis-server from starting, hence no redis.pid or
redis.sock files present.
  • Loading branch information
fidel committed Jan 3, 2025
1 parent 03a90a5 commit 744a661
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion support/nix/redis.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
with import <nixpkgs> {};

mkShell {
buildInputs = [ redis ];
buildInputs = [ redis glibcLocales ];

shellHook = ''
${builtins.readFile ./pushtrap.sh}
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"
LANG = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
TMP=$(mktemp -d)
SOCKET=$TMP/redis.sock
PIDFILE=$TMP/redis.pid
Expand Down

0 comments on commit 744a661

Please sign in to comment.