gnu: docbook2x: Use search-path-as-list for wrapping.

* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Refactor
'wrap-programs phase to use search-path-as-list.
<#:modules>: Add (srfi srfi-26).

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Bruno Victal 2023-10-09 21:06:04 +01:00 committed by Ludovic Courtès
parent 9ae6015602
commit 268d3d09c1
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -888,6 +888,9 @@ Detect the differences in markup between two SGML files.
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list (list
#:modules '((guix build gnu-build-system)
(guix build utils)
(srfi srfi-26))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'install 'move-doc (add-after 'install 'move-doc
@ -898,20 +901,20 @@ Detect the differences in markup between two SGML files.
(rename-file old new)))) (rename-file old new))))
(add-after 'install 'wrap-programs (add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs (let ((programs
(map (lambda (p) (map (lambda (p)
(search-input-file outputs (search-input-file outputs
(string-append "bin/" p))) (string-append "bin/" p)))
'("db2x_manxml" "db2x_texixml" "db2x_xsltproc" '("db2x_manxml" "db2x_texixml" "db2x_xsltproc"
"docbook2man" "docbook2texi"))) "docbook2man" "docbook2texi")))
(perl5lib (perl5lib
'#$(map (lambda (i) (search-path-as-list
(file-append (this-package-input i) '("/lib/perl5/site_perl")
"/lib/perl5/site_perl")) (map (cut assoc-ref inputs <>)
'("perl-xml-namespacesupport" '("perl-xml-namespacesupport"
"perl-xml-parser" "perl-xml-parser"
"perl-xml-sax" "perl-xml-sax"
"perl-xml-sax-base")))) "perl-xml-sax-base")))))
(map (lambda (program) (map (lambda (program)
(wrap-program program (wrap-program program
`("PERL5LIB" ":" prefix ,perl5lib))) `("PERL5LIB" ":" prefix ,perl5lib)))