From 268d3d09c17dc28d0f2d2aaf4830c2855e20daa5 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Mon, 9 Oct 2023 21:06:04 +0100 Subject: [PATCH] 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 --- gnu/packages/docbook.scm | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ab75088437..13854fe331 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -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)))