1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
6 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
23 (define-module (gnu packages gnucash)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system glib-or-gtk)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages docbook)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages gnome)
34 #:use-module (gnu packages gnupg)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages guile)
38 #:use-module (gnu packages icu4c)
39 #:use-module (gnu packages multiprecision)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages tls)
43 #:use-module (gnu packages web)
44 #:use-module (gnu packages webkit)
45 #:use-module (gnu packages xml))
47 (define-public gnucash
54 (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
55 version "/gnucash-" version "-1.tar.bz2"))
58 "1794qi7lkn1kbnhzk08wawacfcphbln3ngdl3q0qax5drv7hnwv8"))
59 (patches (search-patches "gnucash-price-quotes-perl.patch"))))
60 (build-system glib-or-gtk-build-system)
62 `(("guile" ,guile-2.0)
66 ("goffice" ,goffice-0.8)
67 ("libgnomecanvas" ,libgnomecanvas)
70 ("webkitgtk" ,webkitgtk/gtk+-2)
71 ("aqbanking" ,aqbanking)
72 ("perl-date-manip" ,perl-date-manip)
73 ("perl-finance-quote" ,perl-finance-quote)))
75 `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
76 ("intltool" ,intltool)
77 ("gnucash-docs" ,gnucash-docs)
78 ("pkg-config" ,pkg-config)))
79 (outputs '("out" "doc"))
81 `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
82 #:configure-flags '("--disable-dbi"
85 (modify-phases %standard-phases
86 ;; There are about 100 megabytes of documentation.
88 'install 'install-docs
89 (lambda* (#:key inputs outputs #:allow-other-keys)
90 (let ((docs (assoc-ref inputs "gnucash-docs"))
91 (doc-output (assoc-ref outputs "doc")))
92 (symlink (string-append docs "/share/gnome")
93 (string-append doc-output "/share/gnome")))))
95 'install-docs 'wrap-programs
96 (lambda* (#:key inputs outputs #:allow-other-keys)
97 (for-each (lambda (prog)
98 (wrap-program (string-append (assoc-ref outputs "out")
100 `("PERL5LIB" ":" prefix
102 (string-append o "/lib/perl5/site_perl/"
103 ,(package-version perl)))
104 (if (string=? prog "gnc-fq-helper")
106 ,@(transitive-input-references
110 '("perl-finance-quote"
111 "perl-date-manip"))))
113 ,@(transitive-input-references
117 '("perl-finance-quote")))))))))
122 (home-page "https://www.gnucash.org/")
123 (synopsis "Personal and small business financial accounting software")
125 "GnuCash is personal and professional financial-accounting software.
126 It can be used to track bank accounts, stocks, income and expenses, based on
127 the double-entry accounting practice. It includes support for QIF/OFX/HBCI
128 import and transaction matching. It also automates several tasks, such as
129 financial calculations or scheduled transactions.")
130 (license license:gpl3+)))
132 ;; This package is not public, since we use it to build the "doc" output of
133 ;; the gnucash package (see above). It would be confusing if it were public.
136 (name "gnucash-docs")
137 (version (package-version gnucash))
141 (uri (string-append "mirror://sourceforge/gnucash/gnucash-docs/"
142 version "/gnucash-docs-" version ".tar.gz"))
145 "0bzc7mvdba2sc8m61yxa1fp2liqs00b64dvfxhv854vdrl1z5vmb"))))
146 (build-system gnu-build-system)
147 ;; These are native-inputs because they are only required for building the
150 `(("libxml2" ,libxml2)
151 ;; The "check" target needs the docbook xml packages for validating the
152 ;; DocBook XML during the tests.
153 ("docbook-xml-4.4" ,docbook-xml-4.4)
154 ("docbook-xml-4.2" ,docbook-xml-4.2)
155 ("docbook-xml-4.1.2" ,docbook-xml-4.1.2)
157 ("docbook-xsl" ,docbook-xsl)
158 ("scrollkeeper" ,scrollkeeper)))
159 (home-page "https://www.gnucash.org/")
160 (synopsis "Documentation for GnuCash")
162 "User guide and other documentation for GnuCash in various languages.
163 This package exists because the GnuCash project maintains its documentation in
164 an entirely separate package from the actual GnuCash program. It is intended
165 to be read using the GNOME Yelp program.")
166 (license (list license:fdl1.1+ license:gpl3+))))
168 (define-public gwenhywfar
175 (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?"
176 "package=01&release=201&file=01"))
177 (file-name (string-append name "-" version ".tar.gz"))
180 "0fp67s932x66xfljb26zbrn8ambbc5y5c3hllr6l284nr63qf3ka"))))
181 (build-system gnu-build-system)
184 (list "--disable-network-checks"
185 ;; Both GTK+2 and QT4 are supported.
187 (string-append "--with-openssl-includes="
188 (assoc-ref %build-inputs "openssl") "/include")
189 (string-append "--with-openssl-libs="
190 (assoc-ref %build-inputs "openssl") "/lib"))))
192 `(("libgcrypt" ,libgcrypt)
197 `(("pkg-config" ,pkg-config)))
198 (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php")
199 (synopsis "Utility library for networking and security applications")
201 "This package provides a helper library for networking and security
202 applications and libraries. It is used by AqBanking.")
203 ;; The license includes an explicit additional permission to compile and
204 ;; distribute this library with the OpenSSL Toolkit.
205 (license license:lgpl2.1+)))
207 (define-public aqbanking
214 (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?"
215 "package=03&release=208&file=01"))
216 (file-name (string-append name "-" version ".tar.gz"))
219 "08jbwmiv6f3v8iqdr44x4szna496fqcjfi6mlx04cnbx91m70lh6"))))
220 (build-system gnu-build-system)
222 `(;; Parallel building fails because aqhbci is required before it's
226 (list (string-append "--with-gwen-dir="
227 (assoc-ref %build-inputs "gwenhywfar")))))
229 `(("gwenhywfar" ,gwenhywfar)))
235 `(("pkg-config" ,pkg-config)
236 ("libltdl" ,libltdl)))
237 (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php")
238 (synopsis "Interface for online banking tasks")
240 "AqBanking is a modular and generic interface to online banking tasks,
241 financial file formats (import/export) and bank/country/currency information.
242 AqBanking uses backend plugins to actually perform the online tasks. HBCI,
243 OFX DirectConnect, YellowNet, GeldKarte, and DTAUS discs are currently
244 supported. AqBanking is used by GnuCash, KMyMoney, and QBankManager.")
245 ;; AqBanking is licensed under the GPLv2 or GPLv3
246 (license (list license:gpl2 license:gpl3))))