From: Alex Griffin <a@ajgrf.com>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 2/3] gnu: Add ledger.
Date: Sat, 07 May 2016 21:10:48 -0500 [thread overview]
Message-ID: <1462673448.1215366.601202601.6F8B62D7@webmail.messagingengine.com> (raw)
In-Reply-To: <20160507222330.GA16592@jasmine>
[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]
On Sat, May 7, 2016, at 05:23 PM, Leo Famulari wrote:
> It works, at least for the basic things I tried against the examples in
> 'tests/input'. Speaking of which, it would be nice to include an example
> in the output, perhaps under 'share/doc/ledger'.
Okay, done.
> Will you make this line < 80 characters?
Done.
> What's the story with the library? Are there any programs that use it?
Not that I know of, which is why I didn't include it (well, also I
couldn't figure out how to tell cmake that I don't want it to put stuff
in "$out/lib64"). And Python users will probably prefer beancount to the
ledger module. (Beancount is a reimplementation of ledger in Python.)
> There are some GPL'd files in 'contrib/', 'lisp/', and 'python/res/'
>
> The file 'tools/update_copyright_year' has an Expat license.
>
> And, I think that unless we delete the bundled utfcpp, we are
> distributing it through `guix build --source ledger`, so we should
> mention its Boost license.
Is the license field for the source tarball or the package that actually
gets installed? If it's the former, I have to say that's really
unintuitive. I was aware of these extra licenses, but none of that code
gets installed after you build the package. Note that emacs-ledger-mode
uses the same source tarball and I specified its license as GPL2+.
Instead of changing the license field in this patch, I added a note
about the other files to make it clear that changing the build options
may require the license field to change too. I can change it again if
that's wrong, but it seems to me that the license field should really be
about what gets installed.
--
Alex Griffin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-ledger.patch --]
[-- Type: text/x-patch; name="0002-gnu-Add-ledger.patch", Size: 4883 bytes --]
From b97f82dc6bed962fdc59ad674785cb7122846f4a Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 7 May 2016 12:20:47 -0500
Subject: [PATCH 2/3] gnu: Add ledger.
* gnu/packages/finance.scm (ledger): New variable.
---
gnu/packages/finance.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index e9487d4..e57dfaf 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,14 +24,20 @@
#:use-module (guix download)
#:use-module (guix build utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (gnu packages boost)
#:use-module (gnu packages databases)
+ #:use-module (gnu packages groff)
+ #:use-module (gnu packages libedit)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages unicode)
#:use-module (gnu packages upnp))
(define-public bitcoin-core
@@ -81,3 +88,69 @@ collectively by the network. Bitcoin Core is the reference implementation
of the bitcoin protocol. This package provides the Bitcoin Core command
line client and a client based on Qt.")
(license license:expat)))
+
+(define-public ledger
+ (package
+ (name "ledger")
+ (version "3.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ledger/ledger/archive/v"
+ version
+ ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))))
+ (build-system cmake-build-system)
+ ;; If you change the build flags you may need to change the license field
+ ;; too; see below.
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'install-examples
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (examples (string-append out
+ "/share/doc/ledger/examples")))
+ (install-file "test/input/sample.dat" examples)
+ (install-file "test/input/demo.ledger" examples))))
+ (add-after 'build 'build-doc
+ (lambda _ (zero? (system* "make" "doc")))))
+ #:configure-flags
+ `("-DBUILD_DOCS:BOOL=ON"
+ "-DBUILD_LIBRARY:BOOL=OFF"
+ ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH="
+ (assoc-ref %build-inputs "utfcpp")
+ "/include"))))
+ (inputs `(("boost" ,boost)
+ ("gmp" ,gmp)
+ ("libedit" ,libedit)
+ ("mpfr" ,mpfr)
+ ("utfcpp" ,utfcpp)))
+ (native-inputs `(("texinfo" ,texinfo)
+ ("groff" ,groff)))
+ (home-page "http://ledger-cli.org/")
+ (synopsis "Command-line double-entry accounting program")
+ (description
+ "Ledger is a powerful, double-entry accounting system that is
+ accessed from the UNIX command-line. This may put off some users,
+ since there is no flashy UI, but for those who want unparalleled
+ reporting access to their data there are few alternatives.
+
+ Ledger uses text files for input. It reads the files and generates
+ reports; there is no other database or stored state. To use Ledger,
+ you create a file of your account names and transactions, run from
+ the command line with some options to specify input and requested
+ reports, and get output. The output is generally plain text, though
+ you could generate a graph or html instead. Ledger is simple in
+ concept, surprisingly rich in ability, and easy to use.")
+ ;; There are some extra licenses in files which do not presently get
+ ;; installed when you build this package. Different versions of the GPL
+ ;; are used in the contrib, lisp, and python subdirectories. Also the file
+ ;; `tools/update_copyright_year` has an Expat license.
+ (license (list license:bsd-3
+ license:asl2.0
+ (license:non-copyleft
+ "file://src/wcwidth.cc"
+ "See src/wcwidth.cc in the distribution.")))))
--
2.7.4
next prev parent reply other threads:[~2016-05-08 2:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 18:38 [PATCH 2/3] gnu: Add ledger Alex Griffin
2016-05-07 19:20 ` Alex Griffin
2016-05-07 22:23 ` Leo Famulari
2016-05-08 2:10 ` Alex Griffin [this message]
2016-05-09 3:39 ` Leo Famulari
2016-05-09 20:23 ` Ludovic Courtès
2016-05-09 21:01 ` Leo Famulari
2016-05-12 3:28 ` Alex Griffin
2016-05-12 9:12 ` Alex Kost
2016-05-12 16:31 ` Alex Griffin
2016-05-12 19:03 ` Leo Famulari
2016-05-13 19:16 ` Alex Kost
2016-05-13 21:05 ` Alex Griffin
2016-05-14 2:49 ` Leo Famulari
2016-05-16 15:03 ` Alex Kost
2016-05-16 17:45 ` Christopher Allan Webber
2016-05-16 18:05 ` Efraim Flashner
2016-05-16 18:06 ` Leo Famulari
2016-05-16 18:45 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462673448.1215366.601202601.6F8B62D7@webmail.messagingengine.com \
--to=a@ajgrf.com \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).