gnu: emacs-ledger-mode: Update to 4.0.0-0-11e85039.

* gnu/packages/finance.scm (emacs-ledger-mode): Update to 4.0.0-0-11e85039.
[arguments]: Convert to list of G-Expressions.  Use ‘search-input-file’ where
possible.  Drop trailing ‘#t’s.  While here, respect TESTS? in check phase.

Co-authored-by: Aleksandr Vityazev <avityazev@posteo.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Aleksandr Vityazev 2022-05-16 11:04:14 +00:00 committed by Maxim Cournoyer
parent 5fc5cc2f73
commit 5a2b9fc2e6
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -26,6 +26,8 @@
;;; Copyright © 2021 François J <francois-oss@avalenn.eu> ;;; Copyright © 2021 François J <francois-oss@avalenn.eu>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -395,51 +397,53 @@ (define-public ledger
"See src/wcwidth.cc in the distribution."))))) "See src/wcwidth.cc in the distribution.")))))
(define-public emacs-ledger-mode (define-public emacs-ledger-mode
(package ;; The last release was on Nov 8, 2019 and doesn't build with Emacs 28.
(name "emacs-ledger-mode") (let ((commit "11e850395448ee7012dba16bd6df103f5552ebfb")
(version "4.0.0") (revision "0"))
(source (package
(origin (name "emacs-ledger-mode")
(method git-fetch) (version (git-version "4.0.0" revision commit))
(uri (git-reference (source
(url "https://github.com/ledger/ledger-mode") (origin
(commit (string-append "v" version)))) (method git-fetch)
(file-name (git-file-name name version)) (uri (git-reference
(sha256 (url "https://github.com/ledger/ledger-mode")
(base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y")))) (commit commit)))
(build-system emacs-build-system) (file-name (git-file-name name version))
(arguments (sha256
`(;; ledger-test.el is needed at runtime (but probably not for a good reason). (base32 "0hzky36vrlb7kvpyz4gy3zn01zdlmlx0s58w6ggk5djbcvjc2rfx"))))
#:exclude '() (build-system emacs-build-system)
#:phases (arguments
(modify-phases %standard-phases (list
(add-after 'unpack 'patch-path ;; ledger-test.el is needed at runtime (but probably not for a good reason).
(lambda* (#:key inputs #:allow-other-keys) #:exclude #~'()
(let ((ledger (assoc-ref inputs "ledger"))) #:tests? #t
(make-file-writable "ledger-exec.el") #:phases
(emacs-substitute-variables "ledger-exec.el" #~(modify-phases %standard-phases
("ledger-binary-path" (string-append ledger "/bin/ledger")))) (add-after 'unpack 'patch-path
#t)) (lambda* (#:key inputs #:allow-other-keys)
(add-after 'build 'build-doc (make-file-writable "ledger-exec.el")
(lambda* (#:key outputs #:allow-other-keys) (emacs-substitute-variables "ledger-exec.el"
(let ((target (string-append (assoc-ref outputs "out") ("ledger-binary-path" (search-input-file inputs "/bin/ledger")))))
"/share/info"))) (add-after 'build 'build-doc
(mkdir-p target) (lambda _
(invoke "makeinfo" "-o" target (let ((target (string-append #$output "/share/info")))
"../source/doc/ledger-mode.texi")) (mkdir-p target)
#t)) (invoke "makeinfo" "-o" target
(replace 'check "../source/doc/ledger-mode.texi"))))
(lambda _ (replace 'check
(with-directory-excursion "../source/test" (lambda* (#:key tests? #:allow-other-keys)
(invoke "make" "test-batch"))))))) (when tests?
(inputs (with-directory-excursion "../source/test"
(list ledger)) (invoke "make" "test-batch"))))))))
(native-inputs (inputs
(list texinfo)) (list ledger))
(home-page "https://ledger-cli.org/") (native-inputs
(synopsis "Command-line double-entry accounting program") (list texinfo))
(description (home-page "https://ledger-cli.org/")
"Ledger is a powerful, double-entry accounting system that is (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 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 there is no flashy UI, but for those who want unparalleled reporting
access to their data there are few alternatives. access to their data there are few alternatives.
@ -453,7 +457,7 @@ (define-public emacs-ledger-mode
in ability, and easy to use. in ability, and easy to use.
This package provides the Emacs mode.") This package provides the Emacs mode.")
(license license:gpl2+))) (license license:gpl2+))))
(define-public geierlein (define-public geierlein
(package (package