summary refs log tree commit diff
path: root/pkgs/development/misc/yelp-tools/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/misc/yelp-tools/default.nix')
-rw-r--r--pkgs/development/misc/yelp-tools/default.nix62
1 files changed, 47 insertions, 15 deletions
diff --git a/pkgs/development/misc/yelp-tools/default.nix b/pkgs/development/misc/yelp-tools/default.nix
index 7714ef046b7..fc3be7421ad 100644
--- a/pkgs/development/misc/yelp-tools/default.nix
+++ b/pkgs/development/misc/yelp-tools/default.nix
@@ -1,30 +1,62 @@
-{ stdenv, fetchurl, libxml2, libxslt, itstool, gnome3, pkgconfig }:
+{ lib
+, stdenv
+, fetchurl
+, libxml2
+, libxslt
+, itstool
+, gnome
+, pkg-config
+, meson
+, ninja
+, python3
+}:
 
-stdenv.mkDerivation rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "yelp-tools";
-  version = "3.32.2";
+  version = "40.0";
+
+  format = "other";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/yelp-tools/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "1yg8f5g5wadhmy4yfd9yjhvd8vll4gq4l86ibp0b42qbxnsmcf0q";
+    url = "mirror://gnome/sources/yelp-tools/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "1bkanqp3qwmirv06mi99qv2acr5ba5rlhy9zlh0fyrfxygraqjv6";
   };
 
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+  ];
+
+  propagatedBuildInputs = [
+    libxml2 # xmllint required by yelp-check.
+    libxslt # xsltproc required by yelp-build and yelp-check.
+  ];
+
+  buildInputs = [
+    itstool # build script checks for its presence but I am not sure if anything uses it
+    gnome.yelp-xsl
+  ];
+
+  pythonPath = [
+    python3.pkgs.lxml
+  ];
+
+  strictDeps = false; # TODO: Meson cannot find xmllint oherwise. Maybe add it to machine file?
+
+  doCheck = true;
+
   passthru = {
-    updateScript = gnome3.updateScript {
+    updateScript = gnome.updateScript {
       packageName = pname;
     };
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ libxml2 libxslt itstool gnome3.yelp-xsl ];
-
-  doCheck = true;
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://wiki.gnome.org/Apps/Yelp/Tools";
     description = "Small programs that help you create, edit, manage, and publish your Mallard or DocBook documentation";
-    maintainers = with maintainers; [ domenkozar ];
-    license = licenses.gpl2;
-    platforms = platforms.linux;
+    maintainers = teams.gnome.members ++ (with maintainers; [ domenkozar ]);
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
   };
 }