gnu: emacs-ledger-mode: Update to 4.0.0.

* gnu/packages/finance.scm (emacs-ledger-mode): Update to 4.0.0.
[arguments]<#:tests?>: Remove argument.
[phases] check: Replace with working check phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
nixo 2020-11-02 11:15:06 +01:00 committed by Ludovic Courtès
parent 89a4eb38c9
commit 31b97a089d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -355,67 +355,67 @@ (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
;; There have been no new releases since 2016. (package
(let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea") (name "emacs-ledger-mode")
(revision "1")) (version "4.0.0")
(package (source
(name "emacs-ledger-mode") (origin
(version (git-version "3.1.1" revision commit)) (method git-fetch)
(source (uri (git-reference
(origin (url "https://github.com/ledger/ledger-mode")
(method git-fetch) (commit (string-append "v" version))))
(uri (git-reference (file-name (git-file-name name version))
(url "https://github.com/ledger/ledger-mode") (sha256
(commit commit))) (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
(file-name (git-file-name name version)) (build-system cmake-build-system)
(sha256 (arguments
(base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk")))) `(#:modules ((guix build cmake-build-system)
(build-system cmake-build-system) (guix build utils)
(arguments (guix build emacs-utils))
`(#:modules ((guix build cmake-build-system) #:imported-modules (,@%cmake-build-system-modules
(guix build utils) (guix build emacs-utils))
(guix build emacs-utils)) #:phases
#:imported-modules (,@%cmake-build-system-modules (modify-phases %standard-phases
(guix build emacs-utils)) (add-after 'unpack 'patch-site-dir
#:tests? #f ; there are none (lambda _
#:phases (substitute* "CMakeLists.txt"
(modify-phases %standard-phases (("DESTINATION share/emacs/site-lisp/ledger-mode")
(add-after 'unpack 'patch-site-dir "DESTINATION share/emacs/site-lisp"))
(lambda _ #t))
(substitute* "CMakeLists.txt" (add-before 'build 'patch-path
(("DESTINATION share/emacs/site-lisp/ledger-mode") (lambda* (#:key inputs #:allow-other-keys)
"DESTINATION share/emacs/site-lisp")) (let ((ledger (assoc-ref inputs "ledger")))
#t)) (make-file-writable "ledger-exec.el")
(add-before 'build 'patch-path (emacs-substitute-variables "ledger-exec.el"
(lambda* (#:key inputs #:allow-other-keys) ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
(let ((ledger (assoc-ref inputs "ledger"))) #t))
(make-file-writable "ledger-exec.el") (add-after 'build 'build-doc
(emacs-substitute-variables "ledger-exec.el" (lambda* (#:key outputs #:allow-other-keys)
("ledger-binary-path" (string-append ledger "/bin/ledger")))) (let ((target (string-append (assoc-ref outputs "out")
#t)) "/share/info")))
(add-after 'build 'build-doc (mkdir-p target)
(lambda* (#:key outputs #:allow-other-keys) (invoke "makeinfo" "-o" target
(let ((target (string-append (assoc-ref outputs "out") "../source/doc/ledger-mode.texi"))
"/share/info"))) #t))
(mkdir-p target) (add-after 'install 'generate-autoload
(invoke "makeinfo" "-o" target (lambda* (#:key outputs #:allow-other-keys)
"../source/doc/ledger-mode.texi")) (let* ((site-dir (string-append (assoc-ref outputs "out")
#t)) "/share/emacs/site-lisp")))
(add-after 'install 'generate-autoload (emacs-generate-autoloads ,name site-dir))
(lambda* (#:key outputs #:allow-other-keys) #t))
(let* ((site-dir (string-append (assoc-ref outputs "out") (replace 'check
"/share/emacs/site-lisp"))) (lambda _
(emacs-generate-autoloads ,name site-dir)) (with-directory-excursion "../source/test"
#t))))) (invoke "make" "test-batch")))))))
(inputs (inputs
`(("ledger" ,ledger))) `(("ledger" ,ledger)))
(native-inputs (native-inputs
`(("emacs-minimal" ,emacs-minimal) `(("emacs-minimal" ,emacs-minimal)
("texinfo" ,texinfo))) ("texinfo" ,texinfo)))
(home-page "https://ledger-cli.org/") (home-page "https://ledger-cli.org/")
(synopsis "Command-line double-entry accounting program") (synopsis "Command-line double-entry accounting program")
(description (description
"Ledger is a powerful, double-entry accounting system that is "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.
@ -429,7 +429,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