Commit | Line | Data |
---|---|---|
e55c1b67 | 1 | ;;; GNU Guix --- Functional package management for GNU |
aef8a9fb | 2 | ;;; Copyright © 2015, 2016, 2018 Ricardo Wurmus <rekado@elephly.net> |
8b94dffd | 3 | ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> |
57818b6e | 4 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
f3eeca56 | 5 | ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com> |
43412ab9 | 6 | ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
ae283c18 | 7 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
54a80b58 | 8 | ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> |
e55c1b67 RW |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
25 | (define-module (gnu packages gnucash) | |
c71c8b97 | 26 | #:use-module ((guix licenses) #:prefix license:) |
e55c1b67 RW |
27 | #:use-module (guix packages) |
28 | #:use-module (guix download) | |
29 | #:use-module (guix build-system gnu) | |
53e66fbc | 30 | #:use-module (guix build-system cmake) |
e55c1b67 | 31 | #:use-module (gnu packages) |
445aa137 | 32 | #:use-module (gnu packages autotools) |
73ca145a | 33 | #:use-module (gnu packages base) |
53e66fbc RW |
34 | #:use-module (gnu packages boost) |
35 | #:use-module (gnu packages check) | |
36 | #:use-module (gnu packages cmake) | |
54a80b58 | 37 | #:use-module (gnu packages databases) |
f3eeca56 CM |
38 | #:use-module (gnu packages docbook) |
39 | #:use-module (gnu packages documentation) | |
219fe54c | 40 | #:use-module (gnu packages gettext) |
e55c1b67 | 41 | #:use-module (gnu packages gnome) |
5c881f32 | 42 | #:use-module (gnu packages gnupg) |
e55c1b67 RW |
43 | #:use-module (gnu packages glib) |
44 | #:use-module (gnu packages gtk) | |
45 | #:use-module (gnu packages guile) | |
46 | #:use-module (gnu packages icu4c) | |
445aa137 | 47 | #:use-module (gnu packages multiprecision) |
8b94dffd | 48 | #:use-module (gnu packages perl) |
e55c1b67 | 49 | #:use-module (gnu packages pkg-config) |
5c881f32 | 50 | #:use-module (gnu packages tls) |
8b94dffd | 51 | #:use-module (gnu packages web) |
e55c1b67 RW |
52 | #:use-module (gnu packages webkit) |
53 | #:use-module (gnu packages xml)) | |
54 | ||
55 | (define-public gnucash | |
2a67ea73 MC |
56 | ;; TODO: Unbundle libraries such as guile-json found under the "borrowed/" |
57 | ;; directory. | |
e55c1b67 RW |
58 | (package |
59 | (name "gnucash") | |
bc818a57 | 60 | (version "3.8") |
e55c1b67 RW |
61 | (source |
62 | (origin | |
20626f62 MC |
63 | (method url-fetch) |
64 | (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/" | |
bc818a57 | 65 | version "/gnucash-" version "b" ".tar.bz2")) |
20626f62 MC |
66 | (sha256 |
67 | (base32 | |
bc818a57 | 68 | "0dvzm3bib7jcj685sklpzyy9mrak9mxyvih2k9fk4sl3v21wlphg")))) |
53e66fbc | 69 | (build-system cmake-build-system) |
e55c1b67 | 70 | (inputs |
53e66fbc RW |
71 | `(("guile" ,guile-2.2) |
72 | ("boost" ,boost) | |
e55c1b67 RW |
73 | ("icu4c" ,icu4c) |
74 | ("glib" ,glib) | |
53e66fbc | 75 | ("gtk" ,gtk+) |
54a80b58 GLV |
76 | ("libdbi" ,libdbi) |
77 | ("libdbi-drivers" ,libdbi-drivers) | |
e55c1b67 RW |
78 | ("libgnomecanvas" ,libgnomecanvas) |
79 | ("libxml2" ,libxml2) | |
80 | ("libxslt" ,libxslt) | |
53e66fbc | 81 | ("webkitgtk" ,webkitgtk) |
945939a5 | 82 | ("aqbanking" ,aqbanking) |
8b94dffd | 83 | ("perl-date-manip" ,perl-date-manip) |
73ca145a KK |
84 | ("perl-finance-quote" ,perl-finance-quote) |
85 | ("tzdata" ,tzdata-for-tests))) | |
e55c1b67 | 86 | (native-inputs |
20626f62 | 87 | `(("glib" ,glib "bin") ; glib-compile-schemas, etc. |
e55c1b67 | 88 | ("intltool" ,intltool) |
53e66fbc RW |
89 | ("googlemock" ,(package-source googletest)) |
90 | ("googletest" ,googletest) | |
f3eeca56 | 91 | ("gnucash-docs" ,gnucash-docs) |
e55c1b67 | 92 | ("pkg-config" ,pkg-config))) |
2a67ea73 | 93 | (outputs '("out" "doc" "debug")) |
8b94dffd | 94 | (arguments |
53e66fbc RW |
95 | `(#:test-target "check" |
96 | #:configure-flags | |
54a80b58 | 97 | (list "-DWITH_OFX=OFF") ; libofx is not available yet |
73ca145a KK |
98 | #:make-flags '("GUILE_AUTO_COMPILE=0") |
99 | #:modules ((guix build cmake-build-system) | |
100 | ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) | |
101 | (guix build utils)) | |
102 | #:imported-modules (,@%gnu-build-system-modules | |
103 | (guix build cmake-build-system) | |
104 | (guix build glib-or-gtk-build-system)) | |
8b94dffd EB |
105 | #:phases |
106 | (modify-phases %standard-phases | |
53e66fbc RW |
107 | (add-after 'unpack 'unpack-gmock |
108 | (lambda* (#:key inputs #:allow-other-keys) | |
109 | (mkdir "gmock") | |
d5640c58 | 110 | (copy-recursively (assoc-ref inputs "googlemock") "gmock") |
53e66fbc RW |
111 | (setenv "GMOCK_ROOT" (string-append (getcwd) "/gmock/googlemock")) |
112 | #t)) | |
73ca145a KK |
113 | (add-after 'unpack 'set-env-vars |
114 | (lambda* (#:key inputs #:allow-other-keys) | |
115 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
116 | ;; At least one test is time-related and requires this | |
117 | ;; environment variable. | |
118 | (setenv "TZDIR" | |
119 | (string-append tzdata | |
120 | "/share/zoneinfo")) | |
121 | (substitute* "CMakeLists.txt" | |
122 | (("set\\(SHELL /bin/bash\\)") | |
123 | (string-append "set(SHELL " (which "bash") ")"))) | |
124 | #t))) | |
7c8ea31a MC |
125 | ;; After wrapping gnc-fq-check and gnc-fq-helper we can no longer |
126 | ;; execute them with perl, so execute them directly instead. | |
127 | (add-after 'unpack 'fix-finance-quote-check | |
128 | (lambda _ | |
129 | (substitute* "libgnucash/scm/price-quotes.scm" | |
130 | (("\"perl\" \"-w\" ") "")) | |
131 | #t)) | |
a2e7e956 MC |
132 | ;; The qof test requires the en_US, en_GB, and fr_FR locales. |
133 | (add-before 'check 'install-locales | |
134 | (lambda _ | |
135 | (setenv "LOCPATH" (getcwd)) | |
136 | (invoke "localedef" "-i" "en_US" "-f" "UTF-8" "./en_US.UTF-8") | |
137 | (invoke "localedef" "-i" "en_GB" "-f" "UTF-8" "./en_GB.UTF-8") | |
138 | (invoke "localedef" "-i" "fr_FR" "-f" "UTF-8" "./fr_FR.UTF-8") | |
139 | #t)) | |
f3eeca56 | 140 | ;; There are about 100 megabytes of documentation. |
20626f62 MC |
141 | (add-after 'install 'install-docs |
142 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
143 | (let ((docs (assoc-ref inputs "gnucash-docs")) | |
144 | (doc-output (assoc-ref outputs "doc"))) | |
145 | (mkdir-p (string-append doc-output "/share")) | |
146 | (symlink (string-append docs "/share/gnome") | |
147 | (string-append doc-output "/share/gnome")) | |
148 | #t))) | |
149 | (add-after 'install-docs 'wrap-programs | |
150 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
151 | (for-each (lambda (prog) | |
152 | (wrap-program (string-append (assoc-ref outputs "out") | |
153 | "/bin/" prog) | |
54a80b58 GLV |
154 | `("GNC_DBD_DIR" = |
155 | (,(string-append | |
156 | (assoc-ref inputs "libdbi-drivers") | |
157 | "/lib/dbd"))) | |
20626f62 MC |
158 | `("PERL5LIB" ":" prefix |
159 | ,(map (lambda (o) | |
160 | (string-append o "/lib/perl5/site_perl/" | |
161 | ,(package-version perl))) | |
162 | (if (string=? prog "gnc-fq-helper") | |
163 | (list | |
164 | ,@(transitive-input-references | |
165 | 'inputs | |
166 | (map (lambda (l) | |
adb6462c | 167 | (assoc l (package-inputs this-package))) |
20626f62 MC |
168 | '("perl-finance-quote" |
169 | "perl-date-manip")))) | |
170 | (list | |
171 | ,@(transitive-input-references | |
172 | 'inputs | |
173 | (map (lambda (l) | |
adb6462c | 174 | (assoc l (package-inputs this-package))) |
20626f62 MC |
175 | '("perl-finance-quote"))))))))) |
176 | '("gnucash" | |
177 | "gnc-fq-check" | |
178 | "gnc-fq-helper" | |
179 | "gnc-fq-dump")))) | |
73ca145a KK |
180 | (add-after 'install 'glib-or-gtk-compile-schemas |
181 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) | |
182 | (add-after 'install 'glib-or-gtk-wrap | |
183 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) | |
7c1adf00 | 184 | (home-page "https://www.gnucash.org/") |
e55c1b67 RW |
185 | (synopsis "Personal and small business financial accounting software") |
186 | (description | |
187 | "GnuCash is personal and professional financial-accounting software. | |
188 | It can be used to track bank accounts, stocks, income and expenses, based on | |
189 | the double-entry accounting practice. It includes support for QIF/OFX/HBCI | |
190 | import and transaction matching. It also automates several tasks, such as | |
60bfefb6 MC |
191 | financial calculations or scheduled transactions. |
192 | ||
193 | To make the GnuCash documentation available, its doc output must be | |
194 | installed as well as Yelp, the Gnome help browser.") | |
c71c8b97 | 195 | (license license:gpl3+))) |
5c881f32 | 196 | |
f3eeca56 CM |
197 | ;; This package is not public, since we use it to build the "doc" output of |
198 | ;; the gnucash package (see above). It would be confusing if it were public. | |
199 | (define gnucash-docs | |
86d73d59 | 200 | (let ((revision "")) ;set to the empty string when no revision |
2a67ea73 MC |
201 | (package |
202 | (name "gnucash-docs") | |
203 | (version (package-version gnucash)) | |
204 | (source | |
205 | (origin | |
206 | (method url-fetch) | |
207 | (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/" | |
ae283c18 | 208 | version "/gnucash-docs-" version revision ".tar.gz")) |
2a67ea73 MC |
209 | (sha256 |
210 | (base32 | |
bc818a57 | 211 | "19v6kchda724xkkgwlw5rg21jcpirhch12j9sr6ibnv61sd4ql52")))) |
2a67ea73 MC |
212 | (build-system gnu-build-system) |
213 | ;; These are native-inputs because they are only required for building the | |
214 | ;; documentation. | |
215 | (native-inputs | |
216 | `(("libxml2" ,libxml2) | |
217 | ;; The "check" target needs the docbook xml package for validating the | |
218 | ;; DocBook XML during the tests. | |
219 | ("docbook-xml" ,docbook-xml) | |
220 | ("libxslt" ,libxslt) | |
221 | ("docbook-xsl" ,docbook-xsl) | |
222 | ("scrollkeeper" ,scrollkeeper))) | |
223 | (home-page "https://www.gnucash.org/") | |
224 | (synopsis "Documentation for GnuCash") | |
225 | (description | |
226 | "User guide and other documentation for GnuCash in various languages. | |
f3eeca56 CM |
227 | This package exists because the GnuCash project maintains its documentation in |
228 | an entirely separate package from the actual GnuCash program. It is intended | |
229 | to be read using the GNOME Yelp program.") | |
2a67ea73 | 230 | (license (list license:fdl1.1+ license:gpl3+))))) |
f3eeca56 | 231 | |
5c881f32 RW |
232 | (define-public gwenhywfar |
233 | (package | |
234 | (name "gwenhywfar") | |
c82eab7f | 235 | (version "4.99.25rc9") |
5c881f32 RW |
236 | (source |
237 | (origin | |
238 | (method url-fetch) | |
521bb336 | 239 | (uri (string-append "https://www.aquamaniac.de/rdm/attachments/" |
c82eab7f | 240 | "download/223/gwenhywfar-" version ".tar.gz")) |
5c881f32 | 241 | (sha256 |
c82eab7f | 242 | (base32 "14ws780zfyv9qg41z42hlk8sh31w80w3v8n5riaslqhvvxqbfgkq")))) |
5c881f32 RW |
243 | (build-system gnu-build-system) |
244 | (arguments | |
245 | `(#:configure-flags | |
246 | (list "--disable-network-checks" | |
aef8a9fb RW |
247 | ;; GTK+3, GTK+2 and QT4 are supported. |
248 | "--with-guis=gtk3" | |
5c881f32 RW |
249 | (string-append "--with-openssl-includes=" |
250 | (assoc-ref %build-inputs "openssl") "/include") | |
251 | (string-append "--with-openssl-libs=" | |
252 | (assoc-ref %build-inputs "openssl") "/lib")))) | |
253 | (inputs | |
254 | `(("libgcrypt" ,libgcrypt) | |
255 | ("gnutls" ,gnutls) | |
256 | ("openssl" ,openssl) | |
aef8a9fb | 257 | ("gtk+" ,gtk+))) |
5c881f32 RW |
258 | (native-inputs |
259 | `(("pkg-config" ,pkg-config))) | |
c582ab2a | 260 | (home-page "https://www.aquamaniac.de/sites/aqbanking/index.php") |
5c881f32 RW |
261 | (synopsis "Utility library for networking and security applications") |
262 | (description | |
263 | "This package provides a helper library for networking and security | |
264 | applications and libraries. It is used by AqBanking.") | |
265 | ;; The license includes an explicit additional permission to compile and | |
266 | ;; distribute this library with the OpenSSL Toolkit. | |
267 | (license license:lgpl2.1+))) | |
268 | ||
445aa137 RW |
269 | (define-public aqbanking |
270 | (package | |
271 | (name "aqbanking") | |
219fe54c | 272 | (version "5.99.44beta") |
445aa137 RW |
273 | (source |
274 | (origin | |
275 | (method url-fetch) | |
43412ab9 | 276 | (uri (string-append "https://www.aquamaniac.de/rdm/attachments/" |
219fe54c | 277 | "download/224/aqbanking-" version ".tar.gz")) |
445aa137 | 278 | (sha256 |
219fe54c | 279 | (base32 "1cgj8g3wy53galp9pk50a85w0kmwfx3dwl93cbvq6sqb9izxmwdb")))) |
445aa137 RW |
280 | (build-system gnu-build-system) |
281 | (arguments | |
282 | `(;; Parallel building fails because aqhbci is required before it's | |
283 | ;; built. | |
219fe54c | 284 | #:parallel-build? #f)) |
445aa137 RW |
285 | (propagated-inputs |
286 | `(("gwenhywfar" ,gwenhywfar))) | |
287 | (inputs | |
288 | `(("gmp" ,gmp) | |
289 | ("xmlsec" ,xmlsec) | |
290 | ("gnutls" ,gnutls))) | |
291 | (native-inputs | |
292 | `(("pkg-config" ,pkg-config) | |
219fe54c | 293 | ("gettext-minimal", gettext-minimal) |
445aa137 | 294 | ("libltdl" ,libltdl))) |
c582ab2a | 295 | (home-page "https://www.aquamaniac.de/sites/aqbanking/index.php") |
445aa137 RW |
296 | (synopsis "Interface for online banking tasks") |
297 | (description | |
298 | "AqBanking is a modular and generic interface to online banking tasks, | |
299 | financial file formats (import/export) and bank/country/currency information. | |
300 | AqBanking uses backend plugins to actually perform the online tasks. HBCI, | |
301 | OFX DirectConnect, YellowNet, GeldKarte, and DTAUS discs are currently | |
302 | supported. AqBanking is used by GnuCash, KMyMoney, and QBankManager.") | |
303 | ;; AqBanking is licensed under the GPLv2 or GPLv3 | |
304 | (license (list license:gpl2 license:gpl3)))) |