1 { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, libpng, perl, perlPackages, makeWrapper }:
3 stdenv.mkDerivation rec {
8 url = "mirror://savannah/icoutils/icoutils-${version}.tar.bz2";
9 sha256 = "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp";
13 # Fixes a linker failure with newer versions of ld64 due to not supporting nested archives.
15 url = "https://git.savannah.nongnu.org/cgit/icoutils.git/patch/?id=aa3572119bfe34484025f37dbbc4d5070f735908";
16 hash = "sha256-4YCI+SYT2bCBNegkpN5jcfi6gOeec65TmCABr98HHB4=";
20 nativeBuildInputs = [ autoreconfHook makeWrapper ];
21 buildInputs = [ libpng perl ];
22 propagatedBuildInputs = [ perlPackages.LWP ];
24 # Fixes build failures on Darwin. These should be defined in `TargetConditional.h`, but it’s failing anyway.
25 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0 -DTARGET_OS_EMBEDDED=0";
28 patchShebangs extresso/extresso
29 patchShebangs extresso/extresso.in
30 patchShebangs extresso/genresscript
31 patchShebangs extresso/genresscript.in
35 wrapProgram $out/bin/extresso --prefix PERL5LIB : $PERL5LIB
36 wrapProgram $out/bin/genresscript --prefix PERL5LIB : $PERL5LIB
40 homepage = "https://www.nongnu.org/icoutils/";
41 description = "Set of programs to deal with Microsoft Windows(R) icon and cursor files";
42 license = lib.licenses.gpl3Plus;
43 platforms = with lib.platforms; linux ++ darwin;