gnu: packages: Use 'search-patches' everywhere.
[jackhill/guix/guix.git] / gnu / packages / gnucash.scm
CommitLineData
e55c1b67
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 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>
e55c1b67
RW
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)
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 gnome)
28 #:use-module (gnu packages glib)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages guile)
31 #:use-module (gnu packages icu4c)
8b94dffd 32 #:use-module (gnu packages perl)
e55c1b67 33 #:use-module (gnu packages pkg-config)
8b94dffd 34 #:use-module (gnu packages web)
e55c1b67
RW
35 #:use-module (gnu packages webkit)
36 #:use-module (gnu packages xml))
37
38(define-public gnucash
39 (package
40 (name "gnucash")
57818b6e 41 (version "2.6.12")
e55c1b67
RW
42 (source
43 (origin
44 (method url-fetch)
45 (uri (string-append "mirror://sourceforge/gnucash/gnucash-"
46 version ".tar.bz2"))
47 (sha256
48 (base32
57818b6e 49 "0x84f07p30pwhriamv8ifljgw755cj87rc12jy1xddf47spyj7rp"))
fc1adab1 50 (patches (search-patches "gnucash-price-quotes-perl.patch"))))
e55c1b67 51 (build-system gnu-build-system)
e55c1b67
RW
52 (inputs
53 `(("guile" ,guile-2.0)
54 ("icu4c" ,icu4c)
55 ("glib" ,glib)
56 ("gtk" ,gtk+-2)
57 ("goffice" ,goffice-0.8)
58 ("libgnomecanvas" ,libgnomecanvas)
59 ("libxml2" ,libxml2)
60 ("libxslt" ,libxslt)
8b94dffd
EB
61 ("webkitgtk" ,webkitgtk/gtk+-2)
62 ("perl-date-manip" ,perl-date-manip)
63 ("perl-finance-quote" ,perl-finance-quote)))
e55c1b67
RW
64 (native-inputs
65 `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
66 ("intltool" ,intltool)
67 ("pkg-config" ,pkg-config)))
8b94dffd
EB
68 (arguments
69 `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
70 #:configure-flags '("--disable-dbi")
71 #:phases
72 (modify-phases %standard-phases
73 (add-after
74 'install 'wrap-programs
75 (lambda* (#:key inputs outputs #:allow-other-keys)
76 (for-each (lambda (prog)
77 (wrap-program (string-append (assoc-ref outputs "out")
78 "/bin/" prog)
79 `("PERL5LIB" ":" prefix
80 ,(map (lambda (o)
81 (string-append o "/lib/perl5/site_perl/"
82 ,(package-version perl)))
83 (if (string=? prog "gnc-fq-helper")
84 (list
85 ,@(transitive-input-references
86 'inputs
87 (map (lambda (l)
88 (assoc l (inputs)))
89 '("perl-finance-quote"
90 "perl-date-manip"))))
91 (list
92 ,@(transitive-input-references
93 'inputs
94 (map (lambda (l)
95 (assoc l (inputs)))
96 '("perl-finance-quote")))))))))
97 '("gnucash"
98 "gnc-fq-check"
99 "gnc-fq-helper"
100 "gnc-fq-dump")))))))
57818b6e 101 (home-page "http://www.gnucash.org/")
e55c1b67
RW
102 (synopsis "Personal and small business financial accounting software")
103 (description
104 "GnuCash is personal and professional financial-accounting software.
105It can be used to track bank accounts, stocks, income and expenses, based on
106the double-entry accounting practice. It includes support for QIF/OFX/HBCI
107import and transaction matching. It also automates several tasks, such as
108financial calculations or scheduled transactions.")
109 (license gpl3+)))