dcraw: fix build on Darwin

This commit is contained in:
Andrew Childs 2018-08-12 03:09:50 +09:00
parent b28f8b4c94
commit 85c43675d0

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, libjpeg, lcms2, gettext, jasper }:
{stdenv, fetchurl, libjpeg, lcms2, gettext, jasper, libiconv }:
stdenv.mkDerivation rec {
name = "dcraw-9.28.0";
@ -8,15 +8,18 @@ stdenv.mkDerivation rec {
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
};
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin libiconv;
buildInputs = [ libjpeg lcms2 gettext jasper ];
patchPhase = ''
sed -i -e s@/usr/local@$out@ install
substituteInPlace install \
--replace 'prefix=/usr/local' 'prefix=$out' \
--replace gcc '$CC'
'';
buildPhase = ''
mkdir -p $out/bin
sh install
sh -e install
'';
meta = {