summary refs log tree commit diff
path: root/gnu/packages/finance.scm
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2019-04-24 11:12:02 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2019-04-24 11:12:02 +0200
commit1c0dd730922b49c333d793295d912ce44e13498c (patch)
tree4d71928ee450fdb6b63e0e883cd3729893367185 /gnu/packages/finance.scm
parent9ca762eb83592d81f825c70505d8797d7290dd1d (diff)
downloadguix-1c0dd730922b49c333d793295d912ce44e13498c.tar.gz
gnu: emacs-ledger-mode: Use ledger as input.
* gnu/packages/finance.scm (emacs-ledger-mode)[inputs]: Add ledger.
[arguments]: Patch path to ledger executable.
Diffstat (limited to 'gnu/packages/finance.scm')
-rw-r--r--gnu/packages/finance.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index bd30d466f4..9a210b474f 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -241,6 +241,13 @@ in ability, and easy to use.")
          #:tests? #f ; there are none
          #:phases
          (modify-phases %standard-phases
+           (add-before 'build 'patch-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((ledger (assoc-ref inputs "ledger")))
+                 (make-file-writable "ledger-exec.el")
+                 (emacs-substitute-variables "ledger-exec.el"
+                   ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
+               #t))
            (add-after 'build 'build-doc
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((target (string-append (assoc-ref outputs "out")
@@ -260,6 +267,8 @@ in ability, and easy to use.")
                  (rename-file orig-dir dest-dir)
                  (emacs-generate-autoloads ,name dest-dir)
                  #t))))))
+      (inputs
+       `(("ledger" ,ledger)))
       (native-inputs
        `(("emacs-minimal" ,emacs-minimal)
          ("texinfo" ,texinfo)))