[Nix-dev] Locale issues with Nix shell (and GHC) on OSX

2015-11-19 Thread Yves Parès
Hi,
When compiling within a *pure* nix shell with GHC, I get the following
warning:
Warning: unable to set locale to UTF-8 encoding; GHC may fail with 'invalid
character'

and indeed depending on the haskell packages I use, I may get build errors
due to this. (I build with stack, not directly with GHC)
On Ubuntu, this was fixed by adding the package glibcLocales to my
buildInputs.
But on OSX, glibcLocales is just null, and I can't find if there exists an
equivalent to it, or another way to fix the warning (without switching to a*
non pure* shell, which is not okay for ensuring my build environment is
reproducible).

Has someone got extra information?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Locale issues with Nix shell (and GHC) on OSX

2015-11-19 Thread zimbatm
Sorry, I don't know how to help you further. I also don't know why
glibcLocales should be linux-only.

On Thu, 19 Nov 2015 at 12:30 Yves Parès  wrote:

> I actually need Unicode, this is why setting LANG=C is a problem.
>
> 2015-11-19 13:27 GMT+01:00 zimbatm :
>
>> Did you check your environment variables ? I suppose that LANG and
>> friends are set to en_US.UTF-8. You could try to add the locales packages
>> to your shell.nix or change LANG, LC_ALL to "C". If you don't need Unicode
>> that might be easier.
>>
>> On Thu, 19 Nov 2015 10:44 Yves Parès  wrote:
>>
>>> Hi,
>>> When compiling within a *pure* nix shell with GHC, I get the following
>>> warning:
>>> Warning: unable to set locale to UTF-8 encoding; GHC may fail with
>>> 'invalid character'
>>>
>>> and indeed depending on the haskell packages I use, I may get build
>>> errors due to this. (I build with stack, not directly with GHC)
>>> On Ubuntu, this was fixed by adding the package glibcLocales to my
>>> buildInputs.
>>> But on OSX, glibcLocales is just null, and I can't find if there exists
>>> an equivalent to it, or another way to fix the warning (without switching
>>> to a* non pure* shell, which is not okay for ensuring my build
>>> environment is reproducible).
>>>
>>> Has someone got extra information?
>>> ___
>>> nix-dev mailing list
>>> nix-dev@lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Locale issues with Nix shell (and GHC) on OSX

2015-11-19 Thread Vladimír Čunát
On 11/19/2015 09:35 PM, zimbatm wrote:
> I also don't know why glibcLocales should be linux-only.

I think glibcLocales only makes sense if you use glibc, which is not the
case on darwin. (The glibcLocales format even changes between some
versions incompatibly.)

Darwin libc surely has its own way of providing locale data, but I don't
know that platform at all.


Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Locale issues with Nix shell (and GHC) on OSX

2015-11-19 Thread zimbatm
Did you check your environment variables ? I suppose that LANG and friends
are set to en_US.UTF-8. You could try to add the locales packages to your
shell.nix or change LANG, LC_ALL to "C". If you don't need Unicode that
might be easier.

On Thu, 19 Nov 2015 10:44 Yves Parès  wrote:

> Hi,
> When compiling within a *pure* nix shell with GHC, I get the following
> warning:
> Warning: unable to set locale to UTF-8 encoding; GHC may fail with
> 'invalid character'
>
> and indeed depending on the haskell packages I use, I may get build errors
> due to this. (I build with stack, not directly with GHC)
> On Ubuntu, this was fixed by adding the package glibcLocales to my
> buildInputs.
> But on OSX, glibcLocales is just null, and I can't find if there exists an
> equivalent to it, or another way to fix the warning (without switching to a*
> non pure* shell, which is not okay for ensuring my build environment is
> reproducible).
>
> Has someone got extra information?
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Locale issues with Nix shell (and GHC) on OSX

2015-11-19 Thread Yves Parès
I actually need Unicode, this is why setting LANG=C is a problem.

2015-11-19 13:27 GMT+01:00 zimbatm :

> Did you check your environment variables ? I suppose that LANG and friends
> are set to en_US.UTF-8. You could try to add the locales packages to your
> shell.nix or change LANG, LC_ALL to "C". If you don't need Unicode that
> might be easier.
>
> On Thu, 19 Nov 2015 10:44 Yves Parès  wrote:
>
>> Hi,
>> When compiling within a *pure* nix shell with GHC, I get the following
>> warning:
>> Warning: unable to set locale to UTF-8 encoding; GHC may fail with
>> 'invalid character'
>>
>> and indeed depending on the haskell packages I use, I may get build
>> errors due to this. (I build with stack, not directly with GHC)
>> On Ubuntu, this was fixed by adding the package glibcLocales to my
>> buildInputs.
>> But on OSX, glibcLocales is just null, and I can't find if there exists
>> an equivalent to it, or another way to fix the warning (without switching
>> to a* non pure* shell, which is not okay for ensuring my build
>> environment is reproducible).
>>
>> Has someone got extra information?
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev