[Nix-dev] Re: [Nix-commits] SVN commit: nix - 20510 - viric - in nixpkgs/branches/stdenv-updates/pkgs: development/libraries/acl development/libraries/attr development/libraries/gettext os-specific/linux/uclibc tools/misc/coreutils top-level

Lluís Batlle viriketo at gmail.com
Wed Mar 10 10:27:45 CET 2010


2010/3/10 Ludovic Courtès <ludo at gnu.org>:
> Saluton Lluís,
>
> Llus Batlle <viriketo at gmail.com> writes:
>
>> +      ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
>> +        stdenv.gccCross.libc.libiconv.hostDrv;
>
> The condition should be something like ‘(stdenv ? glibc)’ since only
> non-glibc platforms need libiconv.
I thought about that... and decided to do what I did.

It is a bit more difficult to do something very similar to what you propose.

We have different stdenvs for different platforms, and some platforms
have fixed either glibc or another thing. Cross-building, it gets
quite flexible; there is "libcCross", and it points to either a uclibc
or glibc, depending on what the user chose.

I could have done: if (stdenv.cross.libc == "glibc"), and then take
libiconv as a usual input. Do you prefer this way? This would be easy.

Regards,
Lluís.



More information about the nix-dev mailing list