Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, libpng, openjpeg }: 2 3stdenv.mkDerivation rec { 4 pname = "libicns"; 5 version = "0.8.1"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/icns/${pname}-${version}.tar.gz"; 9 sha256 = "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"; 10 }; 11 12 patches = [ 13 (fetchpatch { 14 url = "https://sources.debian.org/data/main/libi/libicns/0.8.1-3.1/debian/patches/support-libopenjp2.patch"; 15 sha256 = "0ss298lyzvydxvaxsadi6kbbjpwykd86jw3za76brcsg2dpssgas"; 16 }) 17 ]; 18 19 nativeBuildInputs = [ autoreconfHook ]; 20 buildInputs = [ libpng openjpeg ]; 21 env.NIX_CFLAGS_COMPILE = toString [ "-I${openjpeg.dev}/include/${openjpeg.incDir}" ]; 22 23 meta = with lib; { 24 description = "Library for manipulation of the Mac OS icns resource format"; 25 homepage = "https://icns.sourceforge.io"; 26 license = with licenses; [ gpl2 lgpl2 lgpl21 ]; 27 platforms = platforms.unix; 28 }; 29}