mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 14:52:05 -05:00
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
This commit is contained in:
parent
595ef43e9b
commit
fe4a77e672
1 changed files with 24 additions and 2 deletions
|
@ -657,7 +657,11 @@ (define-public hexyl
|
|||
(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 @@ (define-public hexyl
|
|||
#: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
|
||||
|
|
Loading…
Reference in a new issue