2021-01-22 00:00:13 +07:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, gettext, python, libgcrypt
|
2016-12-11 18:06:40 +01:00
|
|
|
, cryptoSupport ? false
|
2018-08-20 14:43:41 -04:00
|
|
|
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
|
2016-11-08 10:36:12 +01:00
|
|
|
}:
|
|
|
|
|
2009-10-30 12:42:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-11-09 19:26:09 +08:00
|
|
|
pname = "libxslt";
|
2019-11-10 21:01:53 +00:00
|
|
|
version = "1.1.34";
|
2012-09-28 17:19:48 -04:00
|
|
|
|
2006-10-12 15:43:01 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "http://xmlsoft.org/sources/${pname}-${version}.tar.gz";
|
2019-11-10 21:01:53 +00:00
|
|
|
sha256 = "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq";
|
2006-10-12 15:43:01 +00:00
|
|
|
};
|
2012-09-28 17:19:48 -04:00
|
|
|
|
2021-01-22 00:00:13 +07:00
|
|
|
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ lib.optional pythonSupport "py";
|
2015-07-27 00:25:53 +02:00
|
|
|
|
2019-01-03 21:26:45 +01:00
|
|
|
buildInputs = [ libxml2.dev ]
|
2021-01-22 00:00:13 +07:00
|
|
|
++ lib.optional stdenv.isDarwin gettext
|
|
|
|
++ lib.optionals pythonSupport [ libxml2.py python ]
|
|
|
|
++ lib.optionals cryptoSupport [ libgcrypt ];
|
2012-09-28 17:19:48 -04:00
|
|
|
|
2014-11-25 17:52:43 +01:00
|
|
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
|
|
|
|
2018-01-22 18:57:13 -06:00
|
|
|
configureFlags = [
|
|
|
|
"--with-libxml-prefix=${libxml2.dev}"
|
2013-03-25 13:43:45 +01:00
|
|
|
"--without-debug"
|
|
|
|
"--without-mem-debug"
|
|
|
|
"--without-debugger"
|
2021-01-22 00:00:13 +07:00
|
|
|
] ++ lib.optional pythonSupport "--with-python=${python}"
|
|
|
|
++ lib.optional (!cryptoSupport) "--without-crypto";
|
2013-03-25 13:43:45 +01:00
|
|
|
|
2015-10-05 13:23:01 +02:00
|
|
|
postFixup = ''
|
2015-12-02 10:03:23 +01:00
|
|
|
moveToOutput bin/xslt-config "$dev"
|
|
|
|
moveToOutput lib/xsltConf.sh "$dev"
|
|
|
|
moveToOutput share/man/man1 "$bin"
|
2021-01-22 00:00:13 +07:00
|
|
|
'' + lib.optionalString pythonSupport ''
|
2016-11-08 10:36:12 +01:00
|
|
|
mkdir -p $py/nix-support
|
2017-11-17 13:26:21 -05:00
|
|
|
echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
|
2019-06-15 20:32:52 +02:00
|
|
|
moveToOutput ${python.libPrefix} "$py"
|
2015-10-05 13:23:01 +02:00
|
|
|
'';
|
|
|
|
|
2016-11-08 10:36:12 +01:00
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
|
|
|
};
|
|
|
|
|
2021-01-22 00:00:13 +07:00
|
|
|
meta = with lib; {
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "http://xmlsoft.org/XSLT/";
|
2009-02-03 16:14:23 +00:00
|
|
|
description = "A C library and tools to do XSL transformations";
|
2017-04-28 23:02:37 -04:00
|
|
|
license = licenses.mit;
|
2018-07-20 13:57:16 -04:00
|
|
|
platforms = platforms.all;
|
2015-10-05 13:23:01 +02:00
|
|
|
maintainers = [ maintainers.eelco ];
|
2020-03-29 22:14:24 -04:00
|
|
|
broken = !(pythonSupport -> libxml2.pythonSupport); # see #73102 for why this is not an assert
|
2009-02-03 16:14:23 +00:00
|
|
|
};
|
2006-10-12 15:43:01 +00:00
|
|
|
}
|