gnucash.scm 8.0 KB

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