2019-06-15 19:32:52 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python, libgcrypt
|
2016-12-11 17:06:40 +00:00
|
|
|
, cryptoSupport ? false
|
2018-08-20 19:43:41 +01:00
|
|
|
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
|
2016-11-08 09:36:12 +00:00
|
|
|
}:
|
|
|
|
|
2019-06-15 19:32:52 +01:00
|
|
|
assert pythonSupport -> python != null;
|
2016-11-08 09:36:12 +00:00
|
|
|
assert pythonSupport -> libxml2.pythonSupport;
|
2006-10-12 16:43:01 +01:00
|
|
|
|
2016-12-11 17:06:40 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2009-10-30 12:42:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "libxslt";
|
2019-01-03 20:15:51 +00:00
|
|
|
version = "1.1.33";
|
2012-09-28 22:19:48 +01:00
|
|
|
|
2006-10-12 16:43:01 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://xmlsoft.org/sources/${pname}-${version}.tar.gz";
|
2019-01-03 20:15:51 +00:00
|
|
|
sha256 = "1j1q1swnsy8jgi9x7mclvkrqhfgn09886gdlr9wzk7a08i8n0dlf";
|
2006-10-12 16:43:01 +01:00
|
|
|
};
|
2012-09-28 22:19:48 +01:00
|
|
|
|
2019-04-27 01:04:44 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2019-11068.patch";
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
|
|
|
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
|
|
|
|
})
|
2019-07-16 17:10:13 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/c5eb6cf3aba0af048596106ed839b4ae17ecbcb1.patch";
|
|
|
|
name = "CVE-2019-13117.patch";
|
|
|
|
sha256 = "0ynfq8y5h623cypj1426iiz7796n3mqbjqa24ndvh2am6rl5lw15";
|
|
|
|
})
|
2019-07-16 17:12:05 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/6ce8de69330783977dd14f6569419489875fb71b.patch";
|
|
|
|
name = "CVE-2019-13118.patch";
|
|
|
|
sha256 = "0bglz9m9sh2vi50qxcm06iqrazw3h45ycgxnp15iankq95z283iq";
|
|
|
|
})
|
2019-04-27 01:04:44 +01:00
|
|
|
];
|
|
|
|
|
2017-07-11 10:14:14 +01:00
|
|
|
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
|
2015-07-26 23:25:53 +01:00
|
|
|
|
2019-01-03 20:26:45 +00:00
|
|
|
buildInputs = [ libxml2.dev ]
|
2019-06-15 19:32:52 +01:00
|
|
|
++ stdenv.lib.optionals pythonSupport [ libxml2.py python ]
|
2019-01-03 20:26:45 +00:00
|
|
|
++ stdenv.lib.optionals cryptoSupport [ libgcrypt ];
|
2012-09-28 22:19:48 +01:00
|
|
|
|
2014-11-25 16:52:43 +00:00
|
|
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
|
|
|
|
2018-01-23 00:57:13 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-libxml-prefix=${libxml2.dev}"
|
2013-03-25 12:43:45 +00:00
|
|
|
"--without-debug"
|
|
|
|
"--without-mem-debug"
|
|
|
|
"--without-debugger"
|
2019-06-15 19:32:52 +01:00
|
|
|
] ++ optional pythonSupport "--with-python=${python}"
|
2018-01-23 00:57:13 +00:00
|
|
|
++ optional (!cryptoSupport) "--without-crypto";
|
2013-03-25 12:43:45 +00:00
|
|
|
|
2015-10-05 12:23:01 +01:00
|
|
|
postFixup = ''
|
2015-12-02 09:03:23 +00:00
|
|
|
moveToOutput bin/xslt-config "$dev"
|
|
|
|
moveToOutput lib/xsltConf.sh "$dev"
|
|
|
|
moveToOutput share/man/man1 "$bin"
|
2016-12-11 17:06:40 +00:00
|
|
|
'' + optionalString pythonSupport ''
|
2016-11-08 09:36:12 +00:00
|
|
|
mkdir -p $py/nix-support
|
2017-11-17 18:26:21 +00:00
|
|
|
echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
|
2019-06-15 19:32:52 +01:00
|
|
|
moveToOutput ${python.libPrefix} "$py"
|
2015-10-05 12:23:01 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-08 09:36:12 +00:00
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
|
|
|
};
|
|
|
|
|
2015-10-05 12:23:01 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-02-03 16:14:23 +00:00
|
|
|
homepage = http://xmlsoft.org/XSLT/;
|
|
|
|
description = "A C library and tools to do XSL transformations";
|
2017-04-29 04:02:37 +01:00
|
|
|
license = licenses.mit;
|
2018-07-20 18:57:16 +01:00
|
|
|
platforms = platforms.all;
|
2015-10-05 12:23:01 +01:00
|
|
|
maintainers = [ maintainers.eelco ];
|
2009-02-03 16:14:23 +00:00
|
|
|
};
|
2006-10-12 16:43:01 +01:00
|
|
|
}
|