about summary refs log tree commit diff
path: root/pkgs/applications/misc/xiphos
diff options
context:
space:
mode:
authorDaniel Șerbănescu <daniel@serbanescu.dk>2022-01-13 14:17:17 +0100
committerDaniel Șerbănescu <daniel@serbanescu.dk>2022-01-13 14:17:17 +0100
commit7508d82289268bf8ebddbf40fce537b09d052d8a (patch)
treecee06dc7a7c277418bac119e23e86331bf357a3f /pkgs/applications/misc/xiphos
parent869684264137c977fe4e55d13ccde4d72ca1e3c8 (diff)
xiphos: 4.1.0 -> 4.2.1
- Changes build system from waf to cmake
- Upgrades to enchant-2
Diffstat (limited to 'pkgs/applications/misc/xiphos')
-rw-r--r--pkgs/applications/misc/xiphos/default.nix53
1 files changed, 40 insertions, 13 deletions
diff --git a/pkgs/applications/misc/xiphos/default.nix b/pkgs/applications/misc/xiphos/default.nix
index 01706011e2d57..8e3837acc32dd 100644
--- a/pkgs/applications/misc/xiphos/default.nix
+++ b/pkgs/applications/misc/xiphos/default.nix
@@ -1,43 +1,70 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config
 , python
 , intltool
 , docbook2x, docbook_xml_dtd_412, libxslt
 , sword, clucene_core, biblesync
 , gnome-doc-utils
 , libgsf, gconf
-, gtkhtml, libglade, scrollkeeper
+, libglade, scrollkeeper
 , webkitgtk
 , dbus-glib, enchant, isocodes, libuuid, icu
+, cmake, itstool, desktop-file-utils, appstream-glib, yelp-tools
+, zip, minizip, pcre, libselinux, xorg, libsepol, libthai, libdatrie
+, libxkbcommon, libepoxy, at-spi2-core, libsysprof-capture, sqlite
+, libpsl, brotli, gtk2, glib, dbus, gtkhtml
 , wrapGAppsHook
-, wafHook
 }:
 
 stdenv.mkDerivation rec {
   pname = "xiphos";
-  version = "4.1.0";
+  version = "4.2.1";
 
   src = fetchFromGitHub {
     owner = "crosswire";
     repo = "xiphos";
     rev = version;
-    sha256 = "14il9k4i58qbc78hcadw3gqy21sb9q661d75vlj6fwpczbzj7x1a";
+    hash = "sha256-H5Q+azE2t3fgu77C9DxrkeUCJ7iJz3Cc91Ln4dqLvD8=";
   };
 
-  nativeBuildInputs = [ pkg-config wrapGAppsHook wafHook ];
-  buildInputs = [ python intltool docbook2x docbook_xml_dtd_412 libxslt
-                  sword clucene_core biblesync gnome-doc-utils libgsf gconf gtkhtml
-                  libglade scrollkeeper webkitgtk dbus-glib enchant isocodes libuuid icu ];
+  nativeBuildInputs = [ pkg-config  wrapGAppsHook cmake itstool
+    appstream-glib # for appstream-util
+    desktop-file-utils # for desktop-file-validate
+    yelp-tools # for yelp-build
+  ];
 
-  prePatch = ''
-    patchShebangs .;
-  '';
+  buildInputs = [
+    python intltool docbook2x docbook_xml_dtd_412 libxslt
+    sword clucene_core biblesync gnome-doc-utils libgsf gconf
+    libglade scrollkeeper webkitgtk dbus-glib enchant isocodes libuuid icu
+    zip minizip pcre xorg.libXdmcp libselinux libsepol libthai libdatrie
+    libxkbcommon libepoxy at-spi2-core libsysprof-capture xorg.libXtst
+    sqlite libpsl brotli gtk2 glib dbus dbus-glib gtkhtml
+  ];
+
+  cmakeFlags = [
+    "-DDBUS=OFF"
+    "-DGTKHTML=ON"
+  ];
 
   preConfigure =  ''
+    # The build script won't continue without the version saved locally.
+    echo "${version}" > cmake/source_version.txt
+
     export CLUCENE_HOME=${clucene_core};
     export SWORD_HOME=${sword};
   '';
 
-  wafConfigureFlags = [ "--enable-webkit2" ];
+  patchFlags = [ "-p0" ];
+
+  patches = [
+    # GLIB_VERSION_MIN_REQUIRED is not defined.
+    # https://github.com/crosswire/xiphos/issues/1083#issuecomment-820304874
+    (fetchpatch {
+      name ="xiphos-glibc.patch";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/xiphos-glibc.patch?h=xiphos";
+      sha256 = "sha256-0WadztJKXW2adqsDP8iSAYVShbdqHoDvP+aVJC0cQB0=";
+    })
+  ];
 
   meta = with lib; {
     description = "A GTK Bible study tool";