Skip to content

Commit

Permalink
Build locales with NIX
Browse files Browse the repository at this point in the history
Again something found and debugged by the 🦸 @haitlahcen
  • Loading branch information
paulRbr committed Oct 29, 2018
1 parent c223b40 commit 75cabc5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-

ENV ENV="/home/nixuser/.nix-profile/etc/profile.d/nix.sh"
RUN echo ". ${ENV}" >> ${HOME}/.profile

# All subsequent "RUN" will use a login shell
SHELL ["/usr/bin/env", "bash", "-l", "-c"]

RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable \
&& nix-channel --update

# Propagate UTF8
# https://github.com/NixOS/nix/issues/599#issuecomment-153885553
# The same is hapenning with stack2nix
RUN nix-env -iA nixpkgs.glibcLocales \
&& echo "export LOCALE_ARCHIVE=$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive" >> ${HOME}/.profile

# Make sure to use "login" shell when running container
ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"]

0 comments on commit 75cabc5

Please sign in to comment.