python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / misc / xiphos / default.nix
blob994127baca6d02b9696f4e0f08e16af140f09d8a
1 { stdenv
2 , lib
3 , fetchFromGitHub
4 , fetchpatch
5 , appstream-glib
6 , biblesync
7 , cmake
8 , dbus-glib
9 , desktop-file-utils
10 , docbook2x
11 , docbook_xml_dtd_412
12 , enchant2
13 , glib
14 , gtk3
15 , gtkhtml
16 , icu
17 , intltool
18 , isocodes
19 , itstool
20 , libuuid
21 , libxslt
22 , minizip
23 , pkg-config
24 , sword
25 , webkitgtk
26 , wrapGAppsHook
27 , yelp-tools
28 , zip
31 stdenv.mkDerivation rec {
32   pname = "xiphos";
33   version = "4.2.1";
35   src = fetchFromGitHub {
36     owner = "crosswire";
37     repo = "xiphos";
38     rev = version;
39     hash = "sha256-H5Q+azE2t3fgu77C9DxrkeUCJ7iJz3Cc91Ln4dqLvD8=";
40   };
42   patches = [
43     # GLIB_VERSION_MIN_REQUIRED is not defined.
44     # https://github.com/crosswire/xiphos/issues/1083#issuecomment-820304874
45     (fetchpatch {
46       name ="xiphos-glibc.patch";
47       url = "https://aur.archlinux.org/cgit/aur.git/plain/xiphos-glibc.patch?h=xiphos&id=bb816f43ba764ffac1287ab1e2a649c2443e3ce8";
48       sha256 = "he3U7phU2/QCrZidHviupA7YwzudnQ9Jbb8eMZw6/ck=";
49       extraPrefix = "";
50     })
52     # Fix D-Bus build
53     # https://github.com/crosswire/xiphos/pull/1103
54     ./0001-Add-dbus-glib-dependency-to-main.patch
55   ];
57   nativeBuildInputs = [
58     appstream-glib # for appstream-util
59     cmake
60     desktop-file-utils # for desktop-file-validate
61     docbook2x
62     docbook_xml_dtd_412
63     intltool
64     itstool
65     libxslt
66     pkg-config
67     wrapGAppsHook
68     yelp-tools # for yelp-build
69     zip # for building help epubs
70   ];
72   buildInputs = [
73     biblesync
74     dbus-glib
75     enchant2
76     glib
77     gtk3
78     gtkhtml
79     icu
80     isocodes
81     libuuid
82     minizip
83     sword
84     webkitgtk
85   ];
87   cmakeFlags = [
88     # WebKit-based editor does not build.
89     "-DGTKHTML=ON"
90   ];
92   preConfigure =  ''
93     # The build script won't continue without the version saved locally.
94     echo "${version}" > cmake/source_version.txt
96     export SWORD_HOME=${sword};
97   '';
99   meta = with lib; {
100     description = "A GTK Bible study tool";
101     longDescription = ''
102       Xiphos (formerly known as GnomeSword) is a Bible study tool
103       written for Linux, UNIX, and Windows using GTK, offering a rich
104       and featureful environment for reading, study, and research using
105       modules from The SWORD Project and elsewhere.
106     '';
107     homepage = "https://www.xiphos.org/";
108     license = licenses.gpl2Plus;
109     maintainers = [ maintainers.AndersonTorres ];
110     platforms = platforms.linux;
111   };