summaryrefslogtreecommitdiff
path: root/gnu/packages/xml.scm
diff options
context:
space:
mode:
authorJohn Kehayias <john@guixotic.coop>2025-09-11 16:51:08 -0400
committerMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 16:48:20 +0900
commit58c345f56c05f8d02b1ba22660ad1cf71d50d727 (patch)
tree946fe60f305964505be1c2f42557eea5fdad122e /gnu/packages/xml.scm
parentc0c4ce6d642bc3ae32ad345c17f77ed57842d667 (diff)
gnu: libxml2: Update to 2.14.6; deprecate python-libxml2.
Python bindings for libxml2 are now built as part of libxml2; remove all python-libxml2 inputs for libxml2 (nearly all already had libxml2) and deprecate the package. This was done manually using git grep python-libxml2 gnu/packages to find affected packages and then check all their input fields. With the update to libxml2, we can remove all the libxml2-next* variants. This change was automated with: git grep -rl libxml2-next | xargs sed -i 's/\(libxml2-next\|libxml2-next-for-grafting\)/libxml2/g' * gnu/packages/xml.scm (libxml2): Update to 2.14.6. [arguments]<#:phases>: Add configure-python phase (from python-libxml2). [native-inputs]: Add pkg-config and python-minimal. (libxml2-next, libxml2-next/fixed, libxml2-next-for-grafting): Remove. (python-libxml2): Deprecate in favor of libxml2. Change-Id: I2976f2fde086e9bc345d661edbdc125abbb7a753
Diffstat (limited to 'gnu/packages/xml.scm')
-rw-r--r--gnu/packages/xml.scm110
1 files changed, 20 insertions, 90 deletions
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index b7482bfbe97..20cb0e0bc85 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -37,6 +37,7 @@
37;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr> 37;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
38;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com> 38;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
39;;; Copyright © 2025 Antoine Côté <antoine.cote@posteo.net> 39;;; Copyright © 2025 Antoine Côté <antoine.cote@posteo.net>
40;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com>
40;;; 41;;;
41;;; This file is part of GNU Guix. 42;;; This file is part of GNU Guix.
42;;; 43;;;
@@ -192,15 +193,16 @@ hierarchical form with variable field lengths.")
192(define-public libxml2 193(define-public libxml2
193 (package 194 (package
194 (name "libxml2") 195 (name "libxml2")
195 (version "2.9.14") 196 (version "2.14.6")
196 (source (origin 197 (source (origin
197 (method url-fetch) 198 (method url-fetch)
198 (uri (string-append "mirror://gnome/sources/libxml2/" 199 (uri (string-append "mirror://gnome/sources/libxml2/"
199 (version-major+minor version)"/libxml2-" 200 (version-major+minor version)"/libxml2-"
200 version ".tar.xz")) 201 version ".tar.xz"))
201 (sha256 202 (sha256
202 (base32 203 (base32
203 "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0")))) 204 "0fi0jysncjpvhvp29qcx3bydndapwphgkx7ial5kzf7ymyh5ir3w"))
205 (patches (search-patches "python-libxml2-utf8.patch"))))
204 (build-system gnu-build-system) 206 (build-system gnu-build-system)
205 (outputs '("out" "static" "doc")) 207 (outputs '("out" "static" "doc"))
206 (arguments 208 (arguments
@@ -218,6 +220,13 @@ hierarchical form with variable field lengths.")
218 (string-append "/bin/" file)) ".")) 220 (string-append "/bin/" file)) "."))
219 '("config.guess" "config.sub"))))) 221 '("config.guess" "config.sub")))))
220 #~()) 222 #~())
223 (add-before 'configure 'configure-python
224 (lambda _
225 (substitute* "python/setup.py.in"
226 ;; The build system ignores C_INCLUDE_PATH & co, so
227 ;; provide the absolute directory name.
228 (("/opt/include")
229 (string-append #$output "/include/libxml2")))))
221 (add-after 'install 'use-other-outputs 230 (add-after 'install 'use-other-outputs
222 (lambda _ 231 (lambda _
223 (let ((doc (string-append #$output:doc "/share/")) 232 (let ((doc (string-append #$output:doc "/share/"))
@@ -245,7 +254,7 @@ hierarchical form with variable field lengths.")
245 (native-inputs (append (if (target-loongarch64?) 254 (native-inputs (append (if (target-loongarch64?)
246 (list config) 255 (list config)
247 '()) 256 '())
248 (list perl))) 257 (list perl pkg-config python-minimal)))
249 (native-search-paths 258 (native-search-paths
250 (list $SGML_CATALOG_FILES $XML_CATALOG_FILES)) 259 (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
251 (search-paths native-search-paths) 260 (search-paths native-search-paths)
@@ -254,58 +263,6 @@ hierarchical form with variable field lengths.")
254project (but it is usable outside of the Gnome platform).") 263project (but it is usable outside of the Gnome platform).")
255 (license license:x11))) 264 (license license:x11)))
256 265
257(define-public libxml2-next
258 (package
259 (inherit libxml2)
260 (name "libxml2")
261 (version "2.14.5")
262 (source (origin
263 (method url-fetch)
264 (uri (string-append "mirror://gnome/sources/libxml2/"
265 (version-major+minor version)"/libxml2-"
266 version ".tar.xz"))
267 (sha256
268 (base32
269 "0jylv2kkyzih710blg24al7b43iaqg6xsfn52qy865knagrhdl03"))))
270 (native-inputs (modify-inputs (package-native-inputs libxml2)
271 (append pkg-config
272 python-minimal)))))
273
274(define-public libxml2-next/fixed
275 (package
276 (inherit libxml2)
277 (properties '((hidden? . #t)))
278 (name "libxml2")
279 (version "2.14.5")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append "mirror://gnome/sources/libxml2/"
283 (version-major+minor version)"/libxml2-"
284 version ".tar.xz"))
285 (sha256
286 (base32
287 "0jylv2kkyzih710blg24al7b43iaqg6xsfn52qy865knagrhdl03"))))
288 (arguments
289 (substitute-keyword-arguments (package-arguments libxml2-next)
290 ((#:phases phases #~%standard-phases)
291 #~(modify-phases #$phases
292 (add-after 'install 'symlink-hardcoded-lib-for-grafts
293 (lambda _
294 (let ((lib (string-append #$output "/lib/libxml2.so")))
295 ;; XXX: When grafting, we need to reproduce the file paths to
296 ;; the libraries too.
297 (symlink (string-append lib ".16")
298 (string-append lib ".2")))))))))
299 (native-inputs (modify-inputs (package-native-inputs libxml2)
300 (append pkg-config
301 python-minimal)))))
302
303(define-public libxml2-next-for-grafting
304 (package
305 (inherit libxml2)
306 (replacement libxml2-next/fixed)
307 (properties '((hidden? . #t)))))
308
309(define-public libxml2-xpath0 266(define-public libxml2-xpath0
310 (package/inherit libxml2 267 (package/inherit libxml2
311 (name "libxml2-xpath0") 268 (name "libxml2-xpath0")
@@ -320,34 +277,7 @@ provides an @code{--xpath0} option to @command{xmllint} that enables it
320to output XPath results with a null delimiter."))) 277to output XPath results with a null delimiter.")))
321 278
322(define-public python-libxml2 279(define-public python-libxml2
323 (package/inherit libxml2 280 (deprecated-package "python-libxml2" libxml2))
324 (name "python-libxml2")
325 (source (origin
326 (inherit (package-source libxml2))
327 (patches
328 (append (search-patches "python-libxml2-utf8.patch")
329 (origin-patches (package-source libxml2))))))
330 (build-system pyproject-build-system)
331 (outputs '("out"))
332 (arguments
333 (list
334 ;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
335 #:tests? #f
336 #:phases
337 #~(modify-phases %standard-phases
338 (add-before 'build 'configure
339 (lambda* (#:key inputs #:allow-other-keys)
340 (chdir "python")
341 (let ((libxml2-headers (search-input-directory
342 inputs "include/libxml2")))
343 (substitute* "setup.py"
344 ;; The build system ignores C_INCLUDE_PATH & co, so
345 ;; provide the absolute directory name.
346 (("/opt/include")
347 (dirname libxml2-headers)))))))))
348 (native-inputs (list python-setuptools))
349 (inputs (list libxml2))
350 (synopsis "Python bindings for the libxml2 library")))
351 281
352(define-public libxlsxwriter 282(define-public libxlsxwriter
353 (package 283 (package
@@ -1256,7 +1186,7 @@ XSL-T processor. It also performs any necessary post-processing.")
1256 "1shk40mpaqaf05skgyxa7qxgcarjd6i1fadn2sk0b8lakfv96bnq")))) 1186 "1shk40mpaqaf05skgyxa7qxgcarjd6i1fadn2sk0b8lakfv96bnq"))))
1257 (build-system gnu-build-system) 1187 (build-system gnu-build-system)
1258 (propagated-inputs ; according to xmlsec1.pc 1188 (propagated-inputs ; according to xmlsec1.pc
1259 (list libxml2-next libxslt)) 1189 (list libxml2 libxslt))
1260 (inputs 1190 (inputs
1261 (list gnutls libgcrypt libltdl)) 1191 (list gnutls libgcrypt libltdl))
1262 (native-inputs 1192 (native-inputs