2022-01-13 20:07:04 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-01-13 14:52:48 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, appstream-glib
|
|
|
|
, biblesync
|
|
|
|
, cmake
|
|
|
|
, dbus-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, docbook2x
|
|
|
|
, docbook_xml_dtd_412
|
2022-01-15 04:10:36 +00:00
|
|
|
, enchant2
|
2022-01-13 14:52:48 +00:00
|
|
|
, glib
|
2022-01-15 04:10:36 +00:00
|
|
|
, gtk3
|
2022-01-13 14:52:48 +00:00
|
|
|
, gtkhtml
|
|
|
|
, icu
|
|
|
|
, intltool
|
|
|
|
, isocodes
|
|
|
|
, itstool
|
|
|
|
, libuuid
|
|
|
|
, libxslt
|
|
|
|
, minizip
|
|
|
|
, pkg-config
|
|
|
|
, sword
|
2014-04-19 20:33:00 +01:00
|
|
|
, webkitgtk
|
2017-11-21 00:27:33 +00:00
|
|
|
, wrapGAppsHook
|
2022-01-13 14:52:48 +00:00
|
|
|
, yelp-tools
|
|
|
|
, zip
|
2014-09-27 21:27:51 +01:00
|
|
|
}:
|
2014-04-19 20:33:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "xiphos";
|
2022-01-13 13:17:17 +00:00
|
|
|
version = "4.2.1";
|
2014-04-19 20:33:00 +01:00
|
|
|
|
2017-09-04 13:25:55 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crosswire";
|
|
|
|
repo = "xiphos";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2022-01-13 13:17:17 +00:00
|
|
|
hash = "sha256-H5Q+azE2t3fgu77C9DxrkeUCJ7iJz3Cc91Ln4dqLvD8=";
|
2014-04-19 20:33:00 +01:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:07:04 +00:00
|
|
|
patches = [
|
|
|
|
# GLIB_VERSION_MIN_REQUIRED is not defined.
|
|
|
|
# https://github.com/crosswire/xiphos/issues/1083#issuecomment-820304874
|
|
|
|
(fetchpatch {
|
|
|
|
name ="xiphos-glibc.patch";
|
2022-01-13 20:27:26 +00:00
|
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/xiphos-glibc.patch?h=xiphos&id=bb816f43ba764ffac1287ab1e2a649c2443e3ce8";
|
|
|
|
sha256 = "he3U7phU2/QCrZidHviupA7YwzudnQ9Jbb8eMZw6/ck=";
|
|
|
|
extraPrefix = "";
|
2022-01-13 20:07:04 +00:00
|
|
|
})
|
2022-01-15 04:10:36 +00:00
|
|
|
|
|
|
|
# Fix D-Bus build
|
|
|
|
# https://github.com/crosswire/xiphos/pull/1103
|
|
|
|
./0001-Add-dbus-glib-dependency-to-main.patch
|
2022-01-13 20:07:04 +00:00
|
|
|
];
|
|
|
|
|
2022-01-13 14:52:48 +00:00
|
|
|
nativeBuildInputs = [
|
2022-01-13 20:07:04 +00:00
|
|
|
appstream-glib # for appstream-util
|
2022-01-13 14:52:48 +00:00
|
|
|
cmake
|
2022-01-13 20:07:04 +00:00
|
|
|
desktop-file-utils # for desktop-file-validate
|
2022-01-15 04:10:36 +00:00
|
|
|
docbook2x
|
|
|
|
docbook_xml_dtd_412
|
|
|
|
intltool
|
2022-01-13 14:52:48 +00:00
|
|
|
itstool
|
2022-01-15 04:10:36 +00:00
|
|
|
libxslt
|
2022-01-13 14:52:48 +00:00
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook
|
2022-01-13 20:07:04 +00:00
|
|
|
yelp-tools # for yelp-build
|
2022-01-15 04:10:36 +00:00
|
|
|
zip # for building help epubs
|
2022-01-13 13:17:17 +00:00
|
|
|
];
|
2014-04-19 20:33:00 +01:00
|
|
|
|
2022-01-13 13:17:17 +00:00
|
|
|
buildInputs = [
|
2022-01-13 14:52:48 +00:00
|
|
|
biblesync
|
|
|
|
dbus-glib
|
2022-01-15 04:10:36 +00:00
|
|
|
enchant2
|
2022-01-13 14:52:48 +00:00
|
|
|
glib
|
2022-01-15 04:10:36 +00:00
|
|
|
gtk3
|
2022-01-13 14:52:48 +00:00
|
|
|
gtkhtml
|
|
|
|
icu
|
|
|
|
isocodes
|
|
|
|
libuuid
|
|
|
|
minizip
|
|
|
|
sword
|
|
|
|
webkitgtk
|
2022-01-13 20:07:04 +00:00
|
|
|
];
|
2022-01-13 13:17:17 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-01-15 04:10:36 +00:00
|
|
|
# WebKit-based editor does not build.
|
2022-01-13 13:17:17 +00:00
|
|
|
"-DGTKHTML=ON"
|
|
|
|
];
|
2014-04-19 20:33:00 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2022-01-13 13:17:17 +00:00
|
|
|
# The build script won't continue without the version saved locally.
|
|
|
|
echo "${version}" > cmake/source_version.txt
|
|
|
|
|
2014-04-19 20:33:00 +01:00
|
|
|
export SWORD_HOME=${sword};
|
|
|
|
'';
|
2017-11-21 00:27:33 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-04-19 20:33:00 +01:00
|
|
|
description = "A GTK Bible study tool";
|
|
|
|
longDescription = ''
|
2017-11-21 00:27:33 +00:00
|
|
|
Xiphos (formerly known as GnomeSword) is a Bible study tool
|
|
|
|
written for Linux, UNIX, and Windows using GTK, offering a rich
|
|
|
|
and featureful environment for reading, study, and research using
|
|
|
|
modules from The SWORD Project and elsewhere.
|
2014-04-19 20:33:00 +01:00
|
|
|
'';
|
2020-10-02 08:58:50 +01:00
|
|
|
homepage = "https://www.xiphos.org/";
|
2014-09-10 19:59:54 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
|
|
|
platforms = platforms.linux;
|
2014-04-19 20:33:00 +01:00
|
|
|
};
|
|
|
|
}
|