Commit | Line | Data |
---|---|---|
20c6b9da | 1 | ;;; GNU Guix --- Functional package management for GNU |
fe7fa353 | 2 | ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr> |
4bc0c634 | 3 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
d3699b31 | 4 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
cb0866c3 | 5 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> |
20c6b9da AE |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages finance) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build utils) | |
27 | #:use-module (guix build-system gnu) | |
d3699b31 AG |
28 | #:use-module (guix build-system cmake) |
29 | #:use-module (gnu packages base) | |
20c6b9da AE |
30 | #:use-module (gnu packages boost) |
31 | #:use-module (gnu packages databases) | |
d3699b31 AG |
32 | #:use-module (gnu packages emacs) |
33 | #:use-module (gnu packages groff) | |
34 | #:use-module (gnu packages libedit) | |
14ea30e4 | 35 | #:use-module (gnu packages libevent) |
20c6b9da | 36 | #:use-module (gnu packages linux) |
d3699b31 | 37 | #:use-module (gnu packages multiprecision) |
20c6b9da AE |
38 | #:use-module (gnu packages pkg-config) |
39 | #:use-module (gnu packages protobuf) | |
40 | #:use-module (gnu packages python) | |
41 | #:use-module (gnu packages qt) | |
d3699b31 AG |
42 | #:use-module (gnu packages texinfo) |
43 | #:use-module (gnu packages textutils) | |
20c6b9da | 44 | #:use-module (gnu packages tls) |
cb0866c3 HG |
45 | #:use-module (gnu packages upnp) |
46 | #:use-module (gnu packages gnuzilla)) | |
20c6b9da AE |
47 | |
48 | (define-public bitcoin-core | |
49 | (package | |
50 | (name "bitcoin-core") | |
e49e74f5 | 51 | (version "0.13.0") |
20c6b9da AE |
52 | (source (origin |
53 | (method url-fetch) | |
54 | (uri | |
55 | (string-append "https://bitcoin.org/bin/bitcoin-core-" | |
14ea30e4 | 56 | version "/bitcoin-" version ".tar.gz")) |
20c6b9da AE |
57 | (sha256 |
58 | (base32 | |
e49e74f5 | 59 | "1nhw2s8p1hg6715l6kc1c7psqhkzfwhfrrgiar17zccvd14p0z8c")))) |
20c6b9da AE |
60 | (build-system gnu-build-system) |
61 | (native-inputs | |
62 | `(("pkg-config" ,pkg-config) | |
e49e74f5 | 63 | ("python" ,python) ; for the tests |
20c6b9da AE |
64 | ("util-linux" ,util-linux))) ; provides the hexdump command for tests |
65 | (inputs | |
fe7fa353 | 66 | `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload |
20c6b9da | 67 | ("boost" ,boost) |
14ea30e4 | 68 | ("libevent" ,libevent) |
20c6b9da AE |
69 | ("miniupnpc" ,miniupnpc) |
70 | ("openssl" ,openssl) | |
71 | ("protobuf" ,protobuf) | |
05fe53c6 | 72 | ("qtbase" ,qtbase))) |
20c6b9da AE |
73 | (arguments |
74 | `(#:configure-flags | |
75 | (list | |
76 | ;; We use a bdb version newer than 4.8. | |
77 | "--with-incompatible-bdb" | |
78 | ;; Boost is not found unless specified manually. | |
79 | (string-append "--with-boost=" | |
80 | (assoc-ref %build-inputs "boost"))) | |
81 | #:phases | |
82 | (modify-phases %standard-phases | |
83 | (add-before 'check 'set-home | |
84 | (lambda _ | |
85 | (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME. | |
86 | (home-page "https://bitcoin.org/en/") | |
87 | (synopsis "Bitcoin peer-to-peer client") | |
88 | (description | |
89 | "Bitcoin is a digital currency that enables instant payments to anyone | |
90 | anywhere in the world. It uses peer-to-peer technology to operate without | |
91 | central authority: managing transactions and issuing money are carried out | |
92 | collectively by the network. Bitcoin Core is the reference implementation | |
93 | of the bitcoin protocol. This package provides the Bitcoin Core command | |
94 | line client and a client based on Qt.") | |
95 | (license license:expat))) | |
d3699b31 AG |
96 | |
97 | (define-public ledger | |
98 | (package | |
99 | (name "ledger") | |
100 | (version "3.1.1") | |
101 | (source (origin | |
102 | (method url-fetch) | |
103 | (uri (string-append | |
104 | "https://github.com/ledger/ledger/archive/v" | |
105 | version ".tar.gz")) | |
106 | (file-name (string-append name "-" version ".tar.gz")) | |
107 | (sha256 | |
108 | (base32 | |
109 | "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h")))) | |
110 | (build-system cmake-build-system) | |
111 | (arguments | |
112 | `(#:modules ((guix build cmake-build-system) | |
113 | (guix build utils) | |
114 | (guix build emacs-utils)) | |
115 | #:imported-modules (,@%cmake-build-system-modules | |
116 | (guix build emacs-utils)) | |
117 | #:configure-flags | |
118 | `("-DBUILD_DOCS:BOOL=ON" | |
119 | "-DBUILD_WEB_DOCS:BOOL=ON" | |
120 | "-DBUILD_EMACSLISP:BOOL=ON" | |
121 | "-DUSE_PYTHON:BOOL=ON" | |
122 | "-DCMAKE_INSTALL_LIBDIR:PATH=lib" | |
123 | ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH=" | |
124 | (assoc-ref %build-inputs "utfcpp") | |
125 | "/include")) | |
126 | #:phases | |
127 | (modify-phases %standard-phases | |
128 | (add-before 'configure 'install-examples | |
129 | (lambda* (#:key outputs #:allow-other-keys) | |
130 | (let ((examples (string-append (assoc-ref outputs "out") | |
131 | "/share/doc/ledger/examples"))) | |
132 | (install-file "test/input/sample.dat" examples) | |
133 | (install-file "test/input/demo.ledger" examples)) | |
134 | #t)) | |
135 | (add-after 'build 'build-doc | |
136 | (lambda _ (zero? (system* "make" "doc")))) | |
137 | (add-before 'check 'check-setup | |
138 | ;; One test fails if it can't set the timezone. | |
139 | (lambda* (#:key inputs #:allow-other-keys) | |
140 | (setenv "TZDIR" | |
141 | (string-append (assoc-ref inputs "tzdata") | |
142 | "/share/zoneinfo")) | |
143 | #t)) | |
144 | (add-after 'install 'relocate-elisp | |
145 | (lambda* (#:key outputs #:allow-other-keys) | |
146 | (let* ((site-dir (string-append (assoc-ref outputs "out") | |
147 | "/share/emacs/site-lisp")) | |
148 | (guix-dir (string-append site-dir "/guix.d")) | |
149 | (orig-dir (string-append site-dir "/ledger-mode")) | |
150 | (dest-dir (string-append guix-dir "/ledger-mode"))) | |
151 | (mkdir-p guix-dir) | |
152 | (rename-file orig-dir dest-dir) | |
153 | (emacs-generate-autoloads ,name dest-dir)) | |
154 | #t))))) | |
155 | (inputs | |
156 | `(("boost" ,boost) | |
157 | ("gmp" ,gmp) | |
158 | ("libedit" ,libedit) | |
159 | ("mpfr" ,mpfr) | |
160 | ("python" ,python-2) | |
161 | ("tzdata" ,tzdata) | |
162 | ("utfcpp" ,utfcpp))) | |
163 | (native-inputs | |
b8fc3622 | 164 | `(("emacs" ,emacs-minimal) |
d3699b31 AG |
165 | ("groff" ,groff) |
166 | ("texinfo" ,texinfo))) | |
167 | (home-page "http://ledger-cli.org/") | |
168 | (synopsis "Command-line double-entry accounting program") | |
169 | (description | |
170 | "Ledger is a powerful, double-entry accounting system that is | |
171 | accessed from the UNIX command-line. This may put off some users, since | |
172 | there is no flashy UI, but for those who want unparalleled reporting | |
173 | access to their data there are few alternatives. | |
174 | ||
175 | Ledger uses text files for input. It reads the files and generates | |
176 | reports; there is no other database or stored state. To use Ledger, | |
177 | you create a file of your account names and transactions, run from the | |
178 | command line with some options to specify input and requested reports, and | |
179 | get output. The output is generally plain text, though you could generate | |
180 | a graph or html instead. Ledger is simple in concept, surprisingly rich | |
181 | in ability, and easy to use.") | |
182 | ;; There are some extra licenses in files which do not presently get | |
183 | ;; installed when you build this package. Different versions of the GPL | |
184 | ;; are used in the contrib and python subdirectories. The bundled version | |
185 | ;; of utfcpp is under the Boost 1.0 license. Also the file | |
186 | ;; `tools/update_copyright_year` has an Expat license. | |
187 | (license (list license:bsd-3 | |
188 | license:asl2.0 ; src/strptime.cc | |
189 | (license:non-copyleft | |
190 | "file://src/wcwidth.cc" | |
191 | "See src/wcwidth.cc in the distribution.") | |
192 | license:gpl2+)))) ; lisp/* | |
cb0866c3 HG |
193 | |
194 | (define-public geierlein | |
195 | (package | |
196 | (name "geierlein") | |
197 | (version "0.9.5") | |
198 | (source | |
199 | (origin | |
200 | (method url-fetch) | |
201 | (uri (string-append "https://github.com/stesie/geierlein" | |
202 | "/archive/V" version ".tar.gz")) | |
203 | (file-name (string-append name "-" version ".tar.gz")) | |
204 | (sha256 | |
205 | (base32 | |
206 | "0b11fq8v5w8nxjb20jl4dsfhv76xky6n3sq3k3fbb0m2sq9ikikw")))) | |
207 | (build-system gnu-build-system) | |
208 | (arguments | |
209 | `(#:tests? #f ; would require npm, python and a lot more | |
210 | #:phases | |
211 | (modify-phases %standard-phases | |
212 | (delete 'configure) | |
213 | (add-after 'unpack 'override-target-directory-and-tool-paths | |
214 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
215 | (substitute* "Makefile" | |
216 | (("prefix := .*") | |
217 | (string-append "prefix := " (assoc-ref outputs "out") "\n")) | |
218 | ;; Required for tests, unused for now: | |
219 | ;;(("PYTHON := .*") | |
220 | ;; (string-append (which "python") "\n"))) | |
221 | (("INSTALL := .*") | |
222 | (string-append "INSTALL := " (which "install") "\n"))) | |
223 | (substitute* "bin/xgeierlein.in" | |
224 | ;; Use icecat as XULRUNNER | |
225 | (("^for search ") | |
226 | (string-append "XULRUNNER=" (which "icecat") "\n" | |
227 | "for search "))) | |
228 | #t))))) | |
229 | (inputs | |
230 | `(("icecat" ,icecat))) | |
231 | (home-page "http://stesie.github.io/geierlein/") | |
232 | (synopsis "Free Elster client, for sending Germany VAT declarations") | |
233 | (description | |
234 | "Geierlein is a free Elster client, i.e. an application that | |
235 | allows to send VAT declarations to Germany's fiscal authorities. | |
236 | ||
237 | Currently it is *not* possible to send returns that are due annually | |
238 | (especially the income tax return) since the fiscal authority doesn't | |
239 | allow to do that off the ERiC library (which is proprietary however). | |
240 | It's not clear at the moment whether one day it will be possible to | |
241 | do so.") | |
242 | (license license:agpl3+))) |