From 23853fa81b86517a8a5705b77d4c816b42c917e6 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 18 Jan 2013 17:01:56 -0500 Subject: [PATCH] libnatspec: The build process doesn't respect buildInputs, so force use of libiconv on not-Linux --- pkgs/development/libraries/libnatspec/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libnatspec/default.nix b/pkgs/development/libraries/libnatspec/default.nix index d2747b50ce05..985745c38986 100644 --- a/pkgs/development/libraries/libnatspec/default.nix +++ b/pkgs/development/libraries/libnatspec/default.nix @@ -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"; +})