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