Skip to content

Commit

Permalink
proper locales
Browse files Browse the repository at this point in the history
  • Loading branch information
angerman committed Oct 19, 2019
1 parent c201bda commit de878b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/call-cabal-project-to-nix.nix
Expand Up @@ -165,7 +165,10 @@ let
--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg \
--enable-tests
export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs
# Needed or stack-to-nix will die on unicode inputs
export LANG = "en_US.UTF-8";
export LC_ALL = "en_US.UTF-8";
mkdir -p $out
# ensure we have all our .cabal files (also those generated from package.yaml) files.
Expand Down
4 changes: 3 additions & 1 deletion lib/call-stack-to-nix.nix
Expand Up @@ -17,7 +17,9 @@ let
stack = runCommand "stack-to-nix-pkgs" {
nativeBuildInputs = [ nix-tools pkgs.nix-prefetch-git pkgs.cacert ];
} (''
export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs
# Needed or stack-to-nix will die on unicode inputs
export LANG = "en_US.UTF-8";
export LC_ALL = "en_US.UTF-8";
mkdir -p $out
'' + pkgs.lib.optionalString (cache != null) ''
cp ${mkCacheFile cache} $out/.stack-to-nix.cache
Expand Down
3 changes: 2 additions & 1 deletion overlays/haskell.nix
Expand Up @@ -198,7 +198,8 @@ self: super: {
self.buildPackages.pkgs.runCommand "${name}.nix" {
nativeBuildInputs = [ self.buildPackages.haskell-nix.nix-tools ];
} ''
export LANG=C.utf8 # Needed or cabal-to-nix will die on unicode inputs
export LANG = "en_US.UTF-8";
export LC_ALL = "en_US.UTF-8";
cabal-to-nix "${src}" "${src}/${cabal-file}" > "$out"
'';

Expand Down

0 comments on commit de878b5

Please sign in to comment.