···1+{stdenv, fetchurl, libpng, perl, gettext }:
2+3+stdenv.mkDerivation {
4+ name = "xcftools-1.0.7";
5+6+ src = fetchurl {
7+ url = "http://henning.makholm.net/xcftools/xcftools-1.0.7.tar.gz";
8+ sha256 = "19i0x7yhlw6hd2gp013884zchg63yzjdj4hpany011il0n26vgqy";
9+ };
10+11+ buildInputs = [ libpng perl gettext ];
12+13+ patchPhase = ''
14+ # Required if building with libpng-1.6, innocuous otherwise
15+ substituteInPlace xcf2png.c \
16+ --replace png_voidp_NULL NULL \
17+ --replace png_error_ptr_NULL NULL
18+19+ # xcfview needs mailcap and isn't that useful anyway
20+ sed -i -e '/BINARIES/s/xcfview//' Makefile.in
21+ '';
22+23+ meta = {
24+ homepage = http://henning.makholm.net/software;
25+ description = "Command-line tools for converting Gimp XCF files";
26+ longDescription = ''
27+ A set of fast command-line tools for extracting information from
28+ the Gimp's native file format XCF.
29+30+ The tools are designed to allow efficient use of layered XCF
31+ files as sources in a build system that use 'make' and similar
32+ tools to manage automatic processing of the graphics.
33+34+ These tools work independently of the Gimp engine and do not
35+ require the Gimp to even be installed.
36+ '';
37+ license = stdenv.lib.licenses.gpl2;
38+ };
39+}