18 # Used on Windows, where libpsl doesn't compile, yet
19 curlDep = curl.override { pslSupport = false; };
26 url = "https://www.crosswire.org/ftpmirror/pub/sword/source/v${lib.versions.majorMinor finalAttrs.version}/sword-${finalAttrs.version}.tar.gz";
27 hash = "sha256-QkCc894vrxEIUj4sWsB0XSH57SpceO2HjuncwwNCa4o=";
34 ++ (lib.optionals stdenv.hostPlatform.isWindows [
35 autoreconfHook # The Windows patch modifies autotools files
42 ++ (lib.optionals stdenv.hostPlatform.isUnix [
46 ++ (lib.optionals stdenv.hostPlatform.isWindows [
61 preConfigure = lib.optionalString stdenv.hostPlatform.isWindows ''
62 substituteInPlace configure --replace-fail "-no-undefined" "-Wl,-no-undefined"
65 patches = lib.optional stdenv.hostPlatform.isWindows ./sword-1.9.0-diatheke-includes.patch;
72 ++ (lib.optionals stdenv.hostPlatform.isWindows [
78 makeFlags = lib.optionals stdenv.hostPlatform.isWindows [
79 "LDFLAGS=-no-undefined"
83 # When placed in nativeBuildInputs, icu.dev is finding the native ICU libs, but setting it
84 # explicitly here has it finding the platform appropriate version
85 ICU_CONFIG = lib.optionalString stdenv.hostPlatform.isWindows "${icu.dev}/bin/icu-config --noverify";
86 CURL_CONFIG = lib.optionalString stdenv.hostPlatform.isWindows "${lib.getDev curlDep}/bin/curl-config";
89 builtins.concatStringsSep " " (
91 "-Wno-unused-but-set-variable"
92 "-Wno-unknown-warning-option"
93 # compat with icu61+ https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
94 "-DU_USING_ICU_NAMESPACE=1"
96 ++ (lib.optionals stdenv.hostPlatform.isWindows [
97 "-Wint-to-pointer-cast"
107 description = "Software framework that allows research manipulation of Biblical texts";
108 homepage = "https://www.crosswire.org/sword/";
110 The SWORD Project is the CrossWire Bible Society's free Bible software
111 project. Its purpose is to create cross-platform open-source tools --
112 covered by the GNU General Public License -- that allow programmers and
113 Bible societies to write new Bible software more quickly and easily. We
114 also create Bible study software for all readers, students, scholars, and
115 translators of the Bible, and have a growing collection of many hundred
116 texts in around 100 languages.
118 license = lib.licenses.gpl2;
119 maintainers = with lib.maintainers; [
122 platforms = lib.platforms.all;