diff --git a/pkgs/development/libraries/libicns/default.nix b/pkgs/development/libraries/libicns/default.nix index 298d6124505c..27ec8b17c0d2 100644 --- a/pkgs/development/libraries/libicns/default.nix +++ b/pkgs/development/libraries/libicns/default.nix @@ -1,14 +1,24 @@ -{ stdenv, fetchurl, libpng, jasper }: +{ stdenv, fetchurl, fetchpatch, autoreconfHook, libpng, openjpeg }: stdenv.mkDerivation rec { - name = "libicns-0.8.1"; + pname = "libicns"; + version = "0.8.1"; src = fetchurl { - url = "mirror://sourceforge/icns/${name}.tar.gz"; + url = "mirror://sourceforge/icns/${pname}-${version}.tar.gz"; sha256 = "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"; }; - buildInputs = [ libpng jasper ]; + patches = [ + (fetchpatch { + url = "https://sources.debian.org/data/main/libi/libicns/0.8.1-3.1/debian/patches/support-libopenjp2.patch"; + sha256 = "0ss298lyzvydxvaxsadi6kbbjpwykd86jw3za76brcsg2dpssgas"; + }) + ]; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ libpng openjpeg ]; + NIX_CFLAGS_COMPILE = [ "-I${openjpeg.dev}/include/${openjpeg.incDir}" ]; meta = with stdenv.lib; { description = "Library for manipulation of the Mac OS icns resource format";