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