libnatspec: The build process doesn't respect buildInputs, so force use of libiconv on not-Linux

This commit is contained in:
Shea Levy 2013-01-18 17:01:56 -05:00
parent 7e8fc622e5
commit 23853fa81b

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, popt, libiconvOrEmpty }:
{ stdenv, fetchurl, popt, libiconv }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (rec {
name = "libnatspec-0.2.6";
src = fetchurl {
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "0zvm9afh1skxgdv62ylrpwyykpjhhskxj0zv7yrdf7jhfdriz0y3";
};
buildInputs = [ popt ] ++ libiconvOrEmpty;
buildInputs = [ popt ];
meta = {
homepage = http://natspec.sourceforge.net/ ;
@ -16,4 +16,8 @@ stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.urkud ];
};
}
} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
NIX_CFLAGS_COMPILE = "-I${libiconv}/include";
NIX_CFLAGS_LINK = "-L${libiconv}/lib -liconv";
})