[Nix-dev] libiconv on non-GNU systems

Eelco Dolstra e.dolstra at tudelft.nl
Tue Oct 19 11:04:58 CEST 2010


Hi,

On 10/18/2010 06:45 AM, Yury G. Kudryashov wrote:

> # grep libiconv all-packages.nix
>     libiconv = if stdenv.isDarwin then libiconv else null;
>       zlib curl gd postgresql openssl pkgconfig sqlite getConfig libiconv 
> libjpeg libpng;
>     libiconv = if (stdenv.system == "i686-freebsd") then libiconv else null;
>       libiconv = if stdenv.system == "i686-freebsd" then libiconv else null;
>       libiconv = if stdenv.system == "i686-freebsd" then libiconv else null;
>   libiconv = callPackage ../development/libraries/libiconv { };
> 
> Which test should be used instead of all these? I'm going to unify all these 
> tests into something like
> 
> libiconvPkg = callPackage ...;
> libiconv = if ... then libiconvPkg else stdenv.gcc.libc;
> 
> Then use libiconv everywhere else without re-checking.

Yes, though I would prefer to call the virtual package "iconv" to distinguish it
from the real "libiconv".  So

  libiconv = callPackage ...;

  iconv = if ... then libiconv else stdenv.gcc.libc;

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list