Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HaskellNG] Go back to forcing locale #5904

Closed
Fuuzetsu opened this issue Jan 22, 2015 · 3 comments
Closed

[HaskellNG] Go back to forcing locale #5904

Fuuzetsu opened this issue Jan 22, 2015 · 3 comments
Assignees

Comments

@Fuuzetsu
Copy link
Member

We used to force locale to UTF-8 for Haskell builds but now that we use mkDerivation, we're back to POSIX. It'd be nice to bring back the locale we're all used to considering unicode is quite prominent in Haskell community.

@peti peti self-assigned this Jan 22, 2015
@peti
Copy link
Member

peti commented Jan 22, 2015

Huh? What makes you think that Haskell builds don't run in an UTF-8 environment?

$ nix-shell '<nixpkgs>' -A haskell-ng.packages.ghc784.mtl --command 'declare -p LANG'
declare -x LANG="en_US.UTF-8"

@Fuuzetsu
Copy link
Member Author

[shana@lenalee:~/programming/haddock]$ NIX_PATH='nixpkgs=/home/shana/programming/nixpkgs' nix-shell --pure

[nix-shell:~/programming/haddock]$ cat shell.nix  
with (import <nixpkgs> {}).pkgs;
let pkg = myHaskellngPackages_7101.callPackage
            ({ mkDerivation, base, Cabal, directory, filepath, haddock-api
             , process, stdenv, glibcLocales
             }:
             mkDerivation {
               pname = "haddock";
               version = "2.16.0";
               src = /home/shana/programming/haddock;
               isLibrary = false;
               isExecutable = true;
               buildDepends = [ base haddock-api glibcLocales ];
               testDepends = [ base Cabal directory filepath process ];
               preCheck = "unset GHC_PACKAGE_PATH";
               homepage = "http://www.haskell.org/haddock/";
               description = "A documentation-generation tool for Haskell libraries";
               license = stdenv.lib.licenses.bsd3;
             }) {};
in
  pkg.env

[nix-shell:~/programming/haddock]$ locale                                                                                                                                                                                                                                       
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

@peti
Copy link
Member

peti commented Jan 23, 2015

Ah, you are right! We set the env variables in the build process, but not in the interactive shell. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants