diff --git a/pkgs/applications/misc/xiphos/default.nix b/pkgs/applications/misc/xiphos/default.nix index 01706011e2d5..8e3837acc32d 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"; diff --git a/pkgs/desktops/gnome-2/default.nix b/pkgs/desktops/gnome-2/default.nix index 722168632062..5ef6026f2ff0 100644 --- a/pkgs/desktops/gnome-2/default.nix +++ b/pkgs/desktops/gnome-2/default.nix @@ -49,7 +49,7 @@ lib.makeScope pkgs.newScope (self: with self; { gtkhtml = callPackage ./platform/gtkhtml { enchant = pkgs.enchant1; }; - gtkhtml4 = callPackage ./platform/gtkhtml/4.x.nix { enchant = pkgs.enchant1; }; + gtkhtml4 = callPackage ./platform/gtkhtml/4.x.nix { enchant = pkgs.enchant2; }; gtkglext = callPackage ./platform/gtkglext { }; diff --git a/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix b/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix index d8e1ea7108ee..9447a381a3fb 100644 --- a/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix +++ b/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix @@ -1,16 +1,30 @@ -{ stdenv, fetchurl, pkg-config, gtk3, intltool +{ stdenv, fetchFromGitLab, pkg-config, gtk3, intltool, autoreconfHook, fetchpatch , GConf, enchant, isocodes, gnome-icon-theme, gsettings-desktop-schemas }: stdenv.mkDerivation rec { version = "4.10.0"; pname = "gtkhtml"; - src = fetchurl { - url = "mirror://gnome/sources/gtkhtml/4.10/${pname}-${version}.tar.xz"; - sha256 = "1hq6asgb5n9q3ryx2vngr4jyi8lg65lzpnlgrgcwayiczcj68fya"; + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "Archive"; + repo = "gtkhtml"; + rev = "master"; + sha256 = "sha256-jL8YADvhW0o6I/2Uo5FNARMAnSbvtmFp+zWH1yCVvQk="; }; - propagatedBuildInputs = [ gsettings-desktop-schemas gtk3 gnome-icon-theme GConf ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ intltool enchant isocodes ]; + buildInputs = [ intltool enchant isocodes autoreconfHook ]; + + patchFlags = [ "-p0" ]; + + patches = [ + # Enables enchant2 support. + # Upstream is dead, no further releases are coming. + (fetchpatch { + name ="enchant-2.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/enchant-2.patch?h=gtkhtml4&id=0218303a63d64c04d6483a6fe9bb55063fcfaa43"; + sha256 = "sha256-jkA/GgIiJZmxkbcBGQ26OZ1nuI502BMPwbPhsZkbgbY="; + }) + ]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 359ba4a0a943..482a02e2cee4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29739,7 +29739,7 @@ with pkgs; inherit (gnome2) libglade scrollkeeper; gtkhtml = gnome2.gtkhtml4; python = python27; - enchant = enchant1; + enchant = enchant2; }; xournal = callPackage ../applications/graphics/xournal {