2022-07-14 12:49:19 +00:00
|
|
|
{lib, stdenv, fetchpatch, fetchurl, libpng, perl, gettext }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xcftools";
|
|
|
|
version = "1.0.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "http://henning.makholm.net/xcftools/xcftools-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "19i0x7yhlw6hd2gp013884zchg63yzjdj4hpany011il0n26vgqy";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libpng perl gettext ];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2019-5086.CVE-2019-5087.patch";
|
|
|
|
url = "https://github.com/gladk/xcftools/commit/59c38e3e45b9112c2bcb4392bccf56e297854f8a.patch";
|
|
|
|
sha256 = "sha256-a1Biv6viXzTSaLDzinOyu0HdDTUPsKITsdKu9B9Y8GE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# Required if building with libpng-1.6, innocuous otherwise
|
|
|
|
substituteInPlace xcf2png.c \
|
|
|
|
--replace png_voidp_NULL NULL \
|
|
|
|
--replace png_error_ptr_NULL NULL
|
|
|
|
|
|
|
|
# xcfview needs mailcap and isn't that useful anyway
|
|
|
|
sed -i -e '/BINARIES/s/xcfview//' Makefile.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://henning.makholm.net/software";
|
|
|
|
description = "Command-line tools for converting Gimp XCF files";
|
|
|
|
longDescription = ''
|
|
|
|
A set of fast command-line tools for extracting information from
|
|
|
|
the Gimp's native file format XCF.
|
|
|
|
|
|
|
|
The tools are designed to allow efficient use of layered XCF
|
|
|
|
files as sources in a build system that use 'make' and similar
|
|
|
|
tools to manage automatic processing of the graphics.
|
|
|
|
|
|
|
|
These tools work independently of the Gimp engine and do not
|
|
|
|
require the Gimp to even be installed.
|
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|