diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-01-29 14:19:24 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-02-07 12:28:53 +0100 |
| commit | aa58739aad036294c8c1a63b82de4fd152f0a769 (patch) | |
| tree | 0c5e7ce2f674d0010224fdd41fb5b338fce4709e | |
| parent | 8cafdb0ef136ea6e5b4921764f686e82266fd1fb (diff) | |
gnu: ledger: Improve style.
* gnu/packages/finance.scm (ledger)[arguments]: Improve style, use
gexps and modern style.
| -rw-r--r-- | gnu/packages/finance.scm | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 9e92df38667..c9d0a7c6d43 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -394,43 +394,44 @@ and dynamically with report tools based on filtering and graphical charts.") (base32 "023265i1hd009jwsb8qpjgz8jjqn601rkk7fy1c0dklli7hbykna")))) (build-system cmake-build-system) (arguments - `(#:modules (,@%cmake-build-system-modules + (list + #:modules `(,@%cmake-build-system-modules ((guix build python-build-system) #:select (python-version))) - #:imported-modules (,@%cmake-build-system-modules + #:imported-modules `(,@%cmake-build-system-modules (guix build python-build-system)) - #:configure-flags - `("-DBUILD_DOCS:BOOL=ON" - "-DBUILD_WEB_DOCS:BOOL=ON" - "-DUSE_PYTHON:BOOL=ON" - "-DCMAKE_INSTALL_LIBDIR:PATH=lib") - #:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'unpack 'fix-python-installation-directory - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; By default the package attempts to install its Python bindings - ;; to the Python store directory, which obviously does not work. - ;; Passing -DPython_SITEARCH in #:configure-flags has no effect. - (let ((python-version (python-version (assoc-ref inputs "python"))) - (out (assoc-ref outputs "out"))) - (substitute* "src/CMakeLists.txt" - (("DESTINATION \\$\\{Python_SITEARCH\\}") - (string-append "DESTINATION " out "/lib/python" - python-version "/site-packages")))))) - (add-before 'configure 'install-examples - (lambda* (#:key outputs #:allow-other-keys) - (let ((examples (string-append (assoc-ref outputs "out") - "/share/doc/ledger/examples"))) - (install-file "test/input/sample.dat" examples) - (install-file "test/input/demo.ledger" examples) - (install-file "contrib/report" examples)))) - (add-after 'build 'build-doc - (lambda _ (invoke "make" "doc"))) - (add-before 'check 'check-setup - ;; One test fails if it can't set the timezone. - (lambda* (#:key inputs #:allow-other-keys) - (setenv "TZDIR" - (search-input-directory inputs - "share/zoneinfo"))))))) + #:configure-flags + #~(list "-DBUILD_DOCS:BOOL=ON" + "-DBUILD_WEB_DOCS:BOOL=ON" + "-DUSE_PYTHON:BOOL=ON" + "-DCMAKE_INSTALL_LIBDIR:PATH=lib") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-python-installation-directory + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; By default the package attempts to install its Python bindings + ;; to the Python store directory, which obviously does not work. + ;; Passing -DPython_SITEARCH in #:configure-flags has no effect. + (let ((python-version (python-version (assoc-ref inputs "python"))) + (out (assoc-ref outputs "out"))) + (substitute* "src/CMakeLists.txt" + (("DESTINATION \\$\\{Python_SITEARCH\\}") + (string-append "DESTINATION " out "/lib/python" + python-version "/site-packages")))))) + (add-before 'configure 'install-examples + (lambda* (#:key outputs #:allow-other-keys) + (let ((examples (string-append (assoc-ref outputs "out") + "/share/doc/ledger/examples"))) + (install-file "test/input/sample.dat" examples) + (install-file "test/input/demo.ledger" examples) + (install-file "contrib/report" examples)))) + (add-after 'build 'build-doc + (lambda _ (invoke "make" "doc"))) + (add-before 'check 'check-setup + ;; One test fails if it can't set the timezone. + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TZDIR" + (search-input-directory inputs + "share/zoneinfo"))))))) (inputs (list boost-1.83 gmp |
