From 1b6e2b9a191fb28ffbb4f99f2aa92ceb109b05f8 Mon Sep 17 00:00:00 2001 From: Paul Liu Date: Fri, 16 Dec 2016 01:30:50 -0800 Subject: [PATCH] Fix netpbm installation for OS X (#21194) * Update meta.platform to linux ++ darwin for netpbm --- pkgs/tools/graphics/netpbm/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/netpbm/default.nix b/pkgs/tools/graphics/netpbm/default.nix index 3c724ccc2b83..d0381e912511 100644 --- a/pkgs/tools/graphics/netpbm/default.nix +++ b/pkgs/tools/graphics/netpbm/default.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation rec { substituteInPlace "config.mk" \ --replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff.out}/lib/libtiff.so" \ --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff.dev}/include" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk + echo "NETPBMLIBTYPE = dylib" >> config.mk + echo "NETPBMLIBSUFFIX = dylib" >> config.mk ''; preBuild = '' @@ -56,6 +60,6 @@ stdenv.mkDerivation rec { homepage = http://netpbm.sourceforge.net/; description = "Toolkit for manipulation of graphic images"; license = "GPL,free"; - platforms = stdenv.lib.platforms.linux; + platforms = with stdenv.lib.platforms; linux ++ darwin; }; }