diff options
Diffstat (limited to 'pkgs/development/libraries/gd')
-rw-r--r-- | pkgs/development/libraries/gd/default.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gd/default.nix b/pkgs/development/libraries/gd/default.nix index f4386a22ffa12..cf0ed7883a069 100644 --- a/pkgs/development/libraries/gd/default.nix +++ b/pkgs/development/libraries/gd/default.nix @@ -8,6 +8,7 @@ , libXpm ? null , fontconfig , freetype +, fetchpatch, autoreconfHook, perl }: stdenv.mkDerivation rec { @@ -19,7 +20,17 @@ stdenv.mkDerivation rec { sha256 = "1311g5mva2xlzqv3rjqjc4jjkn5lzls4skvr395h633zw1n7b7s8"; }; - nativeBuildInputs = [ pkgconfig ]; + # Address an incompatibility with Darwin's libtool + patches = stdenv.lib.optional stdenv.isDarwin (fetchpatch { + url = https://github.com/libgd/libgd/commit/502e4cd873c3b37b307b9f450ef827d40916c3d6.patch; + sha256 = "0gawr2c4zr6cljnwzhdlxhz2mkbg0r5vzvr79dv6yf6fcj06awfs"; + }); + + # -pthread gets passed to clang, causing warnings + configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no"; + + nativeBuildInputs = [ pkgconfig ] + ++ stdenv.lib.optionals stdenv.isDarwin [ autoreconfHook perl ]; buildInputs = [ zlib fontconfig freetype ]; propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ]; |