From ec28ce00fd14528a9ad4baca05128c76b1bab995 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:52 +0100 Subject: [PATCH] gnu: libxslt: Set search-paths for XML and SGML catalogs. According to xsltproc manpage it supports both XML_CATALOG_FILES and SGML_CATALOG_FILES for catalog lookup. Since the native-search-paths field is not thunked, doing (package-native-search-paths libxslt) can lead to module import cycles so we define a %libxslt-search-paths variable to avoid this kind of trouble. * guix/search-paths.scm (%libxslt-search-paths): New variable. * gnu/packages/xml.scm (libxslt)[native-search-paths]: Set to %libxslt-search-paths. * gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]: Ditto. Signed-off-by: Maxim Cournoyer --- gnu/packages/perl.scm | 4 +--- gnu/packages/xml.scm | 1 + guix/search-paths.scm | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 90bf7575ba4ffd987d04f98f7b1205461def91e5..1d94e2543618c695bdd46993f13c3f46f889be42 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -600,9 +600,7 @@ requires only 10MB of RAM.") (list libxslt)) (propagated-inputs (list perl-class-xsaccessor perl-test-trap)) - (native-search-paths - ;; xsltproc's search paths, to avoid propagating libxslt. - (list $XML_CATALOG_FILES)) + (native-search-paths %libxslt-search-paths) (home-page "https://www.shlomifish.org/open-source/projects/docmake/") (synopsis "Translate DocBook/XML documentation into other file formats") (description diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 3e7a14616f965584a6102a3123f532b0b6d995e8..7506b3d4e10d15453a01213c582d26c3cce687e6 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -367,6 +367,7 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.") xz)) (native-inputs (list pkg-config)) + (native-search-paths %libxslt-search-paths) (description "Libxslt is an XSLT C library developed for the GNOME project. It is based on libxml for XML parsing, tree manipulation and XPath support.") diff --git a/guix/search-paths.scm b/guix/search-paths.scm index d325e579896892ef10dd8e4ba718d95a00bb16b2..a935684952b735357c71f95d2c7723b599e49019 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -46,6 +46,7 @@ $XML_CATALOG_FILES %gcc-search-paths + %libxslt-search-paths search-path-specification->sexp sexp->search-path-specification @@ -179,6 +180,9 @@ (file-pattern "^catalog\\.xml$") (file-type 'regular))) +(define %libxslt-search-paths + (list $SGML_CATALOG_FILES $XML_CATALOG_FILES)) + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a . The sexp corresponds to the arguments expected by `set-path-environment-variable'."