guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add beancount.


From: guix-commits
Subject: 01/02: gnu: Add beancount.
Date: Thu, 2 Apr 2020 11:20:01 -0400 (EDT)

cwebber pushed a commit to branch master
in repository guix.

commit f1f724841a6b610e162d36d08225094317ebaf09
Author: Christopher Lemmer Webber <address@hidden>
AuthorDate: Tue Mar 31 16:57:15 2020 -0400

    gnu: Add beancount.
    
    * gnu/packages/finance.scm (beancount): New variable.
    * gnu/packages/patches/beancount-disable-googleapis-fonts.patch: New file.
    * gnu/local.mk: Add it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/finance.scm                           | 42 ++++++++++++++++++++++
 .../beancount-disable-googleapis-fonts.patch       | 25 +++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 6c85e6e..d490869 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -761,6 +761,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/bash-completion-directories.patch       \
   %D%/packages/patches/bastet-change-source-of-unordered_set.patch     \
   %D%/packages/patches/bazaar-CVE-2017-14176.patch             \
+  %D%/packages/patches/beancount-disable-googleapis-fonts.patch        \
   %D%/packages/patches/beets-werkzeug-compat.patch             \
   %D%/packages/patches/beignet-correct-file-names.patch                \
   %D%/packages/patches/benchmark-unbundle-googletest.patch     \
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 7bf8f4f..e666860 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2019 Martin Becze <address@hidden>
 ;;; Copyright © 2019 Sebastian Schott <address@hidden>
 ;;; Copyright © 2020 Kei Kebreau <address@hidden>
+;;; Copyright © 2020 Christopher Lemmer Webber <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1398,3 +1399,44 @@ 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)))))
+    (propagated-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-pytest" ,python-pytest)
+       ("python-requests" ,python-requests)))
+    (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)))
diff --git a/gnu/packages/patches/beancount-disable-googleapis-fonts.patch 
b/gnu/packages/patches/beancount-disable-googleapis-fonts.patch
new file mode 100644
index 0000000..d0fa47b
--- /dev/null
+++ b/gnu/packages/patches/beancount-disable-googleapis-fonts.patch
@@ -0,0 +1,25 @@
+https://sources.debian.org/data/main/b/beancount/2.2.0-3/debian/patches/0001-Remove-fonts.googleapis.com-links-for-the-bean-web-t.patch
+
+From: Nicolas Dandrimont <address@hidden>
+Date: Tue, 1 May 2018 04:49:55 +0200
+Subject: Remove fonts.googleapis.com links for the bean-web template
+
+---
+ beancount/web/web.html | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/beancount/web/web.html b/beancount/web/web.html
+index 3995ce2..ec9e707 100644
+--- a/beancount/web/web.html
++++ b/beancount/web/web.html
+@@ -3,10 +3,6 @@
+   <head>
+     <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ 
+-    <link 
href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400italic,700italic,700,400";
 rel="stylesheet" type="text/css" />
+-    <link 
href="https://fonts.googleapis.com/css?family=Roboto:400italic,700italic,700,400";
 rel="stylesheet" type="text/css" />
+-    <link href='https://fonts.googleapis.com/css?family=Droid+Sans+Mono' 
rel='stylesheet' type='text/css' />
+-
+     <link href="/resources/web.css" rel="stylesheet" type="text/css" />
+     <title>{{title}}: {{pagetitle}}</title>
+ 
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]