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
|
2022-10-30 15:09:59 +00:00
|
|
|
, libxcrypt
|
2022-03-30 09:31:56 +00:00
|
|
|
, libgcrypt
|
2020-04-24 23:36:52 +00:00
|
|
|
, cryptoSupport ? false
|
2022-11-21 17:40:18 +00:00
|
|
|
, pythonSupport ? libxml2.pythonSupport
|
2022-03-30 09:31:56 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libxslt";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.1.42";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" "devdoc" ] ++ lib.optional pythonSupport "py";
|
|
|
|
outputMan = "bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "mirror://gnome/sources/libxslt/${lib.versions.majorMinor finalAttrs.version}/libxslt-${finalAttrs.version}.tar.xz";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-hcpiysDUH8d9P2Az2p32/XPSDqL8GLCjYJ/7QRDhuus=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
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 = [
|
2022-10-30 15:09:59 +00:00
|
|
|
libxml2.dev libxcrypt
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-03-30 09:31:56 +00:00
|
|
|
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-10-30 15:09:59 +00:00
|
|
|
(lib.withFeature pythonSupport "python")
|
2023-11-16 04:20:00 +00:00
|
|
|
(lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
|
2022-03-30 09:31:56 +00:00
|
|
|
] ++ lib.optionals (!cryptoSupport) [
|
|
|
|
"--without-crypto"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
moveToOutput bin/xslt-config "$dev"
|
|
|
|
moveToOutput lib/xsltConf.sh "$dev"
|
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-09-30 11:47:45 +00:00
|
|
|
moveToOutput ${python.sitePackages} "$py"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
updateScript = gnome.updateScript {
|
2024-07-27 06:49:29 +00:00
|
|
|
packageName = "libxslt";
|
2022-03-30 09:31:56 +00:00
|
|
|
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";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "C library and tools to do XSL transformations";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
2024-07-27 06:49:29 +00:00
|
|
|
})
|