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