From ab77ea0bf25dd1f193c8dd078ef7e90523366135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 27 Sep 2019 19:44:32 +0200 Subject: [PATCH] giflib: fix build on darwin by patch submitted upstream It broke by the update in 3605f128. The patch seems OK on a quick look. --- pkgs/development/libraries/giflib/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/giflib/default.nix b/pkgs/development/libraries/giflib/default.nix index d97477e3f3a..e047bdbb648 100644 --- a/pkgs/development/libraries/giflib/default.nix +++ b/pkgs/development/libraries/giflib/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, xmlto, docbook_xml_dtd_412, docbook_xsl, libxml2 }: +{ stdenv, fetchurl, fetchpatch, xmlto, docbook_xml_dtd_412, docbook_xsl, libxml2 }: stdenv.mkDerivation rec { name = "giflib-5.2.1"; @@ -7,6 +7,15 @@ stdenv.mkDerivation rec { sha256 = "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii"; }; + patches = stdenv.lib.optional stdenv.hostPlatform.isDarwin + (fetchpatch { + # https://sourceforge.net/p/giflib/bugs/133/ + name = "darwin-soname.patch"; + url = "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch"; + sha256 = "12afkqnlkl3n1hywwgx8sqnhp3bz0c5qrwcv8j9hifw1lmfhv67r"; + extraPrefix = "./"; + }); + postPatch = '' substituteInPlace Makefile \ --replace 'PREFIX = /usr/local' 'PREFIX = ${builtins.placeholder "out"}'