···11+{stdenv, fetchurl, libpng, perl, gettext }:
22+33+stdenv.mkDerivation {
44+ name = "xcftools-1.0.7";
55+66+ src = fetchurl {
77+ url = "http://henning.makholm.net/xcftools/xcftools-1.0.7.tar.gz";
88+ sha256 = "19i0x7yhlw6hd2gp013884zchg63yzjdj4hpany011il0n26vgqy";
99+ };
1010+1111+ buildInputs = [ libpng perl gettext ];
1212+1313+ patchPhase = ''
1414+ # Required if building with libpng-1.6, innocuous otherwise
1515+ substituteInPlace xcf2png.c \
1616+ --replace png_voidp_NULL NULL \
1717+ --replace png_error_ptr_NULL NULL
1818+1919+ # xcfview needs mailcap and isn't that useful anyway
2020+ sed -i -e '/BINARIES/s/xcfview//' Makefile.in
2121+ '';
2222+2323+ meta = {
2424+ homepage = http://henning.makholm.net/software;
2525+ description = "Command-line tools for converting Gimp XCF files";
2626+ longDescription = ''
2727+ A set of fast command-line tools for extracting information from
2828+ the Gimp's native file format XCF.
2929+3030+ The tools are designed to allow efficient use of layered XCF
3131+ files as sources in a build system that use 'make' and similar
3232+ tools to manage automatic processing of the graphics.
3333+3434+ These tools work independently of the Gimp engine and do not
3535+ require the Gimp to even be installed.
3636+ '';
3737+ license = stdenv.lib.licenses.gpl2;
3838+ };
3939+}