diff options
Diffstat (limited to 'gnu/packages/finance.scm')
-rw-r--r-- | gnu/packages/finance.scm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 7bf8f4fc6e..ea1fcbe9d4 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net> ;;; Copyright © 2019 Sebastian Schott <sschott@mailbox.org> ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net> +;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system emacs) #:use-module (guix build-system python) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system go) @@ -1398,3 +1400,65 @@ entity management.") electronic cash system. This package provides a command line client and a Qt GUI.") (license license:expat))) + +(define-public beancount + (package + (name "beancount") + (version "2.2.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "beancount" version)) + (sha256 + (base32 + "0pcfl2rx2ng06i4f9izdpnlnb1k0rdzsckbzzn4cn4ixfzyssm0m")) + (patches (search-patches "beancount-disable-googleapis-fonts.patch")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; Says test is missing, not sure why + #:phases + (modify-phases %standard-phases + ;; Not importing the googleapis package for now + (add-after 'unpack 'ignore-googleapis + (lambda _ + (substitute* "setup.py" + (("'google-api-python-client',") "")) + #t))))) + (inputs + `(("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-bottle" ,python-bottle) + ("python-chardet" ,python-chardet) + ("python-dateutil" ,python-dateutil) + ("python-lxml" ,python-lxml) + ("python-magic" ,python-magic) + ("python-ply" ,python-ply) + ("python-requests" ,python-requests))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "http://furius.ca/beancount") + (synopsis "Command-line double-entry accounting tool") + (description + "Beancount is a double-entry bookkeeping computer language that lets you +define financial transaction records in a text file, read them in memory, +generate a variety of reports from them, and provides a web interface.") + (license license:gpl2))) + +;; The beancount source ships with elisp in a subdirectory +(define-public emacs-beancount + (package + (inherit beancount) + (name "emacs-beancount") + (build-system emacs-build-system) + (arguments + `(#:tests? #f ;no tests + #:phases + (modify-phases %standard-phases + (add-before 'install 'chdir-emacs + (lambda _ + (chdir "editors/emacs") + #t))))) + (inputs '()) + (native-inputs '()) + (synopsis "Emacs mode for beancount") + (description + "Emacs-beancount is an Emacs mode for the Beancount accounting tool."))) |