diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-01-29 09:54:15 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-02-20 13:58:36 +0200 |
commit | fe4a77e672174c326f7d8cf9ad7810ed34f1f4e0 (patch) | |
tree | ddaaed4d330cb80dfe027d074d1896f454ea1466 | |
parent | 595ef43e9b0e2a7b387a008d7f850236aace0d6d (diff) | |
download | guix-fe4a77e672174c326f7d8cf9ad7810ed34f1f4e0.tar.gz |
gnu: hexyl: Install man-page.
* gnu/packages/rust-apps.scm (hexyl)[source]: Add snippet to fix the version string in the man-page. [arguments]: Add a phase to build the man-page. [native-inputs]: Add pandoc on systems where it is supported. Change-Id: I1dc98862020a5176f15adb8a2579f249c233f2da
-rw-r--r-- | gnu/packages/rust-apps.scm | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index f5d4062d2c..fe27bdf675 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -657,7 +657,11 @@ defaults for 80% of the use cases.") (uri (crate-uri "hexyl" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0fhbc4ibpbbgcgx2v6wzxcn63jz76cvdp2f8jdg747h65hvp5bcm")))) + (base32 "0fhbc4ibpbbgcgx2v6wzxcn63jz76cvdp2f8jdg747h65hvp5bcm")) + (snippet + #~(begin (use-modules (guix build utils)) + (substitute* "doc/hexyl.1.md" + (("0\\.12\\.0") "0.14.0")))))) (build-system cargo-build-system) (arguments `(#:install-source? #f @@ -673,7 +677,25 @@ defaults for 80% of the use cases.") #:cargo-development-inputs (("rust-assert-cmd" ,rust-assert-cmd-2) ("rust-predicates" ,rust-predicates-3) - ("rust-pretty-assertions" ,rust-pretty-assertions-1)))) + ("rust-pretty-assertions" ,rust-pretty-assertions-1)) + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-manual + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((man1 (string-append (assoc-ref outputs "out") + "/share/man/man1"))) + (when (assoc-ref inputs "pandoc") + (mkdir-p man1) + (with-output-to-file (string-append man1 "/hexyl.1") + (lambda _ + (invoke "pandoc" "--standalone" + "--from" "markdown" + "--to" "man" + "doc/hexyl.1.md")))))))))) + (native-inputs + (if (supported-package? pandoc) + (list pandoc) + '())) (home-page "https://github.com/sharkdp/hexyl") (synopsis "Command-line hex viewer") (description |