2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2021-05-28 09:39:13 +00:00
|
|
|
, pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, libxml2
|
|
|
|
, findXMLCatalogs
|
|
|
|
, gettext
|
|
|
|
, python
|
|
|
|
, ncurses
|
|
|
|
, libgcrypt
|
2020-04-24 23:36:52 +00:00
|
|
|
, cryptoSupport ? false
|
|
|
|
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
|
2022-03-30 09:31:56 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libxslt";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.1.35";
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ lib.optional pythonSupport "py";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "gkfzPpqHLGrIWapFAYvExNALl+L+rJ7rwQyTzh803Xk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
autoreconfHook
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
libxml2.dev
|
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
|
|
gettext
|
|
|
|
] ++ lib.optionals pythonSupport [
|
|
|
|
libxml2.py
|
|
|
|
python
|
|
|
|
ncurses
|
|
|
|
] ++ lib.optionals cryptoSupport [
|
|
|
|
libgcrypt
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
findXMLCatalogs
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--without-debug"
|
|
|
|
"--without-mem-debug"
|
|
|
|
"--without-debugger"
|
2022-09-09 14:08:57 +00:00
|
|
|
(lib.withFeatureAs pythonSupport "python" python)
|
2022-03-30 09:31:56 +00:00
|
|
|
] ++ lib.optionals (!cryptoSupport) [
|
|
|
|
"--without-crypto"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
moveToOutput bin/xslt-config "$dev"
|
|
|
|
moveToOutput lib/xsltConf.sh "$dev"
|
|
|
|
moveToOutput share/man/man1 "$bin"
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString pythonSupport ''
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $py/nix-support
|
|
|
|
echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
|
2022-01-13 20:06:32 +00:00
|
|
|
moveToOutput ${python.libPrefix} "$py"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
updateScript = gnome.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
versionPolicy = "none";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/libxslt";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A C library and tools to do XSL transformations";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ eelco jtojnar ];
|
|
|
|
broken = pythonSupport && !libxml2.pythonSupport; # see #73102 for why this is not an assert
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|