| 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 | ;;; |
| 6 | ;;; This file is part of GNU Guix. |
| 7 | ;;; |
| 8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 9 | ;;; under the terms of the GNU General Public License as published by |
| 10 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 11 | ;;; your option) any later version. |
| 12 | ;;; |
| 13 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | ;;; GNU General Public License for more details. |
| 17 | ;;; |
| 18 | ;;; You should have received a copy of the GNU General Public License |
| 19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 20 | |
| 21 | (define-module (gnu packages gnucash) |
| 22 | #:use-module ((guix licenses) #:prefix license:) |
| 23 | #:use-module (guix packages) |
| 24 | #:use-module (guix download) |
| 25 | #:use-module (guix build-system gnu) |
| 26 | #:use-module (gnu packages) |
| 27 | #:use-module (gnu packages autotools) |
| 28 | #:use-module (gnu packages gnome) |
| 29 | #:use-module (gnu packages gnupg) |
| 30 | #:use-module (gnu packages glib) |
| 31 | #:use-module (gnu packages gtk) |
| 32 | #:use-module (gnu packages guile) |
| 33 | #:use-module (gnu packages icu4c) |
| 34 | #:use-module (gnu packages multiprecision) |
| 35 | #:use-module (gnu packages perl) |
| 36 | #:use-module (gnu packages pkg-config) |
| 37 | #:use-module (gnu packages tls) |
| 38 | #:use-module (gnu packages web) |
| 39 | #:use-module (gnu packages webkit) |
| 40 | #:use-module (gnu packages xml)) |
| 41 | |
| 42 | (define-public gnucash |
| 43 | (package |
| 44 | (name "gnucash") |
| 45 | (version "2.6.14") |
| 46 | (source |
| 47 | (origin |
| 48 | (method url-fetch) |
| 49 | (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/" |
| 50 | version "/gnucash-" version ".tar.bz2")) |
| 51 | (sha256 |
| 52 | (base32 |
| 53 | "0xcf2nl3v6zsablmla20v283x3r0jdpixcbp37mzap82lln4y51v")) |
| 54 | (patches (search-patches "gnucash-price-quotes-perl.patch")))) |
| 55 | (build-system gnu-build-system) |
| 56 | (inputs |
| 57 | `(("guile" ,guile-2.0) |
| 58 | ("icu4c" ,icu4c) |
| 59 | ("glib" ,glib) |
| 60 | ("gtk" ,gtk+-2) |
| 61 | ("goffice" ,goffice-0.8) |
| 62 | ("libgnomecanvas" ,libgnomecanvas) |
| 63 | ("libxml2" ,libxml2) |
| 64 | ("libxslt" ,libxslt) |
| 65 | ("webkitgtk" ,webkitgtk/gtk+-2) |
| 66 | ("aqbanking" ,aqbanking) |
| 67 | ("perl-date-manip" ,perl-date-manip) |
| 68 | ("perl-finance-quote" ,perl-finance-quote))) |
| 69 | (native-inputs |
| 70 | `(("glib" ,glib "bin") ; glib-compile-schemas, etc. |
| 71 | ("intltool" ,intltool) |
| 72 | ("pkg-config" ,pkg-config))) |
| 73 | (arguments |
| 74 | `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff |
| 75 | #:configure-flags '("--disable-dbi" |
| 76 | "--enable-aqbanking") |
| 77 | #:phases |
| 78 | (modify-phases %standard-phases |
| 79 | (add-after |
| 80 | 'install 'wrap-programs |
| 81 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 82 | (for-each (lambda (prog) |
| 83 | (wrap-program (string-append (assoc-ref outputs "out") |
| 84 | "/bin/" prog) |
| 85 | `("PERL5LIB" ":" prefix |
| 86 | ,(map (lambda (o) |
| 87 | (string-append o "/lib/perl5/site_perl/" |
| 88 | ,(package-version perl))) |
| 89 | (if (string=? prog "gnc-fq-helper") |
| 90 | (list |
| 91 | ,@(transitive-input-references |
| 92 | 'inputs |
| 93 | (map (lambda (l) |
| 94 | (assoc l (inputs))) |
| 95 | '("perl-finance-quote" |
| 96 | "perl-date-manip")))) |
| 97 | (list |
| 98 | ,@(transitive-input-references |
| 99 | 'inputs |
| 100 | (map (lambda (l) |
| 101 | (assoc l (inputs))) |
| 102 | '("perl-finance-quote"))))))))) |
| 103 | '("gnucash" |
| 104 | "gnc-fq-check" |
| 105 | "gnc-fq-helper" |
| 106 | "gnc-fq-dump"))))))) |
| 107 | (home-page "http://www.gnucash.org/") |
| 108 | (synopsis "Personal and small business financial accounting software") |
| 109 | (description |
| 110 | "GnuCash is personal and professional financial-accounting software. |
| 111 | It can be used to track bank accounts, stocks, income and expenses, based on |
| 112 | the double-entry accounting practice. It includes support for QIF/OFX/HBCI |
| 113 | import and transaction matching. It also automates several tasks, such as |
| 114 | financial calculations or scheduled transactions.") |
| 115 | (license license:gpl3+))) |
| 116 | |
| 117 | (define-public gwenhywfar |
| 118 | (package |
| 119 | (name "gwenhywfar") |
| 120 | (version "4.15.3") |
| 121 | (source |
| 122 | (origin |
| 123 | (method url-fetch) |
| 124 | (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?" |
| 125 | "package=01&release=201&file=01&dummy=gwenhywfar-" |
| 126 | version ".tar.gz")) |
| 127 | (file-name (string-append name "-" version ".tar.gz")) |
| 128 | (sha256 |
| 129 | (base32 |
| 130 | "0fp67s932x66xfljb26zbrn8ambbc5y5c3hllr6l284nr63qf3ka")))) |
| 131 | (build-system gnu-build-system) |
| 132 | (arguments |
| 133 | `(#:configure-flags |
| 134 | (list "--disable-network-checks" |
| 135 | ;; Both GTK+2 and QT4 are supported. |
| 136 | "--with-guis=gtk2" |
| 137 | (string-append "--with-openssl-includes=" |
| 138 | (assoc-ref %build-inputs "openssl") "/include") |
| 139 | (string-append "--with-openssl-libs=" |
| 140 | (assoc-ref %build-inputs "openssl") "/lib")))) |
| 141 | (inputs |
| 142 | `(("libgcrypt" ,libgcrypt) |
| 143 | ("gnutls" ,gnutls) |
| 144 | ("openssl" ,openssl) |
| 145 | ("gtk+" ,gtk+-2))) |
| 146 | (native-inputs |
| 147 | `(("pkg-config" ,pkg-config))) |
| 148 | (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php") |
| 149 | (synopsis "Utility library for networking and security applications") |
| 150 | (description |
| 151 | "This package provides a helper library for networking and security |
| 152 | applications and libraries. It is used by AqBanking.") |
| 153 | ;; The license includes an explicit additional permission to compile and |
| 154 | ;; distribute this library with the OpenSSL Toolkit. |
| 155 | (license license:lgpl2.1+))) |
| 156 | |
| 157 | (define-public aqbanking |
| 158 | (package |
| 159 | (name "aqbanking") |
| 160 | (version "5.6.10") |
| 161 | (source |
| 162 | (origin |
| 163 | (method url-fetch) |
| 164 | (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?" |
| 165 | "package=03&release=206&file=01&dummy=aqbanking-" |
| 166 | version ".tar.gz")) |
| 167 | (file-name (string-append name "-" version ".tar.gz")) |
| 168 | (sha256 |
| 169 | (base32 |
| 170 | "1x0isvpk43rq2zlyyb9p0kgjmqv7yq07vgkiprw3f5sjkykvxw6d")))) |
| 171 | (build-system gnu-build-system) |
| 172 | (arguments |
| 173 | `(;; Parallel building fails because aqhbci is required before it's |
| 174 | ;; built. |
| 175 | #:parallel-build? #f |
| 176 | #:configure-flags |
| 177 | (list (string-append "--with-gwen-dir=" |
| 178 | (assoc-ref %build-inputs "gwenhywfar"))))) |
| 179 | (propagated-inputs |
| 180 | `(("gwenhywfar" ,gwenhywfar))) |
| 181 | (inputs |
| 182 | `(("gmp" ,gmp) |
| 183 | ("xmlsec" ,xmlsec) |
| 184 | ("gnutls" ,gnutls))) |
| 185 | (native-inputs |
| 186 | `(("pkg-config" ,pkg-config) |
| 187 | ("libltdl" ,libltdl))) |
| 188 | (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php") |
| 189 | (synopsis "Interface for online banking tasks") |
| 190 | (description |
| 191 | "AqBanking is a modular and generic interface to online banking tasks, |
| 192 | financial file formats (import/export) and bank/country/currency information. |
| 193 | AqBanking uses backend plugins to actually perform the online tasks. HBCI, |
| 194 | OFX DirectConnect, YellowNet, GeldKarte, and DTAUS discs are currently |
| 195 | supported. AqBanking is used by GnuCash, KMyMoney, and QBankManager.") |
| 196 | ;; AqBanking is licensed under the GPLv2 or GPLv3 |
| 197 | (license (list license:gpl2 license:gpl3)))) |