forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / libxslt / default.nix
blob34092649067c08d7da8dee5f599493de8c3bf075
1 { lib
2 , stdenv
3 , fetchurl
4 , pkg-config
5 , autoreconfHook
6 , libxml2
7 , findXMLCatalogs
8 , gettext
9 , python
10 , ncurses
11 , libxcrypt
12 , libgcrypt
13 , cryptoSupport ? false
14 , pythonSupport ? libxml2.pythonSupport
15 , gnome
18 stdenv.mkDerivation (finalAttrs: {
19   pname = "libxslt";
20   version = "1.1.42";
22   outputs = [ "bin" "dev" "out" "doc" "devdoc" ] ++ lib.optional pythonSupport "py";
23   outputMan = "bin";
25   src = fetchurl {
26     url = "mirror://gnome/sources/libxslt/${lib.versions.majorMinor finalAttrs.version}/libxslt-${finalAttrs.version}.tar.xz";
27     hash = "sha256-hcpiysDUH8d9P2Az2p32/XPSDqL8GLCjYJ/7QRDhuus=";
28   };
30   strictDeps = true;
32   nativeBuildInputs = [
33     pkg-config
34     autoreconfHook
35   ];
37   buildInputs = [
38     libxml2.dev libxcrypt
39   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
40     gettext
41   ] ++ lib.optionals pythonSupport [
42     libxml2.py
43     python
44     ncurses
45   ] ++ lib.optionals cryptoSupport [
46     libgcrypt
47   ];
49   propagatedBuildInputs = [
50     findXMLCatalogs
51   ];
53   configureFlags = [
54     "--without-debug"
55     "--without-mem-debug"
56     "--without-debugger"
57     (lib.withFeature pythonSupport "python")
58     (lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
59   ] ++ lib.optionals (!cryptoSupport) [
60     "--without-crypto"
61   ];
63   enableParallelBuilding = true;
65   postFixup = ''
66     moveToOutput bin/xslt-config "$dev"
67     moveToOutput lib/xsltConf.sh "$dev"
68   '' + lib.optionalString pythonSupport ''
69     mkdir -p $py/nix-support
70     echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
71     moveToOutput ${python.sitePackages} "$py"
72   '';
74   passthru = {
75     inherit pythonSupport;
77     updateScript = gnome.updateScript {
78       packageName = "libxslt";
79       versionPolicy = "none";
80     };
81   };
83   meta = with lib; {
84     homepage = "https://gitlab.gnome.org/GNOME/libxslt";
85     description = "C library and tools to do XSL transformations";
86     license = licenses.mit;
87     platforms = platforms.all;
88     maintainers = with maintainers; [ jtojnar ];
89     broken = pythonSupport && !libxml2.pythonSupport; # see #73102 for why this is not an assert
90   };