mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: perl-xml-xpath: Wrap xpath command.
* gnu/packages/xml.scm (perl-xml-xpath)[arguments]: Wrap xpath. Add test for wrapped xpath. [description]: Document xpath command presence. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
7ee764bbe5
commit
f246666d32
1 changed files with 21 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
|
||||
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
|
||||
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
|
||||
;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -1048,6 +1049,25 @@ (define-public perl-xml-xpath
|
|||
(base32
|
||||
"03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
|
||||
(build-system perl-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'wrap 'wrap-xpath
|
||||
(lambda _
|
||||
(let ((xpath (string-append #$output "/bin/xpath"))
|
||||
(perl5lib
|
||||
(search-path-as-list
|
||||
'("/lib/perl5/site_perl")
|
||||
(list #$(this-package-input "perl-xml-parser")
|
||||
#$output))))
|
||||
(wrap-program xpath
|
||||
`("PERL5LIB" ":" prefix ,perl5lib)))))
|
||||
(add-after 'wrap-xpath 'check-wrap
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(unsetenv "PERL5LIB")
|
||||
(invoke/quiet (string-append #$output "/bin/xpath"))))))))
|
||||
(native-inputs
|
||||
(list perl-path-tiny))
|
||||
(propagated-inputs
|
||||
|
@ -1057,7 +1077,7 @@ (define-public perl-xml-xpath
|
|||
(description
|
||||
"This module aims to comply exactly to the @url{XPath specification,
|
||||
https://www.w3.org/TR/xpath} and yet allow extensions to be added in
|
||||
the form of functions.")
|
||||
the form of functions. It also provides the command @command{xpath}.")
|
||||
(license license:perl-license)))
|
||||
|
||||
(define-public pugixml
|
||||
|
|
Loading…
Reference in a new issue