me
/
guix
Archived
1
0
Fork 0

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
master
Efraim Flashner 2024-01-29 09:54:15 +02:00
parent 595ef43e9b
commit fe4a77e672
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 24 additions and 2 deletions

View File

@ -657,7 +657,11 @@ defaults for 80% of the use cases.")
(uri (crate-uri "hexyl" version)) (uri (crate-uri "hexyl" version))
(file-name (string-append name "-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz"))
(sha256 (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) (build-system cargo-build-system)
(arguments (arguments
`(#:install-source? #f `(#:install-source? #f
@ -673,7 +677,25 @@ defaults for 80% of the use cases.")
#:cargo-development-inputs #:cargo-development-inputs
(("rust-assert-cmd" ,rust-assert-cmd-2) (("rust-assert-cmd" ,rust-assert-cmd-2)
("rust-predicates" ,rust-predicates-3) ("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") (home-page "https://github.com/sharkdp/hexyl")
(synopsis "Command-line hex viewer") (synopsis "Command-line hex viewer")
(description (description