From c03df1daf91d1592c9c88d8ff27f533edc5d4ab3 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 2 Oct 2025 09:51:33 +0100 Subject: [PATCH] gnu: ruby-libxml: Refresh package style. * gnu/packages/ruby-xyz.scm (ruby-libxml): Use G-expressions, adjust fields position, fix indentation. Change-Id: I78c6defafece7ee24204f7d849dd7429504747c3 --- gnu/packages/ruby-xyz.scm | 79 ++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm index b430250d006aa05c5163a56caef2531be9168b26..d295019a7e819f8f960e082ef6d96606034c680f 100644 --- a/gnu/packages/ruby-xyz.scm +++ b/gnu/packages/ruby-xyz.scm @@ -2832,49 +2832,50 @@ extensions.") (method url-fetch) (uri (rubygems-uri "libxml-ruby" version)) (sha256 - (base32 - "1rkahmh2p3mapmcy5x4b3jf80a9jcvx85yky34k2n3lar03gphvq")))) + (base32 "1rkahmh2p3mapmcy5x4b3jf80a9jcvx85yky34k2n3lar03gphvq")))) (build-system ruby-build-system) (native-inputs (list ruby-minitest ruby-rake-compiler)) + (arguments + (list + #:gem-flags + ;; TODO: Re-enable when documentation generation works + #~(list "--no-document" + "--" + (string-append "--with-xml2-include=" + #$(this-package-input "libxml2") + "/include/libxml2" )) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'skip-failing-tests + (lambda _ + (for-each + (lambda (method) + (substitute* "test/test_canonicalize.rb" + (((string-append "def " method) def) + (string-append def "; skip \"CR/LF mismatch\";")))) + '("test_canonicalize_with_w3c_c14n_3_1" + "test_canonicalize_with_w3c_c14n_3_2" + "test_canonicalize_with_w3c_c14n_3_3" + "test_canonicalize_with_w3c_c14n_3_4")) + (substitute* "test/test_schema.rb" + (("def test_schema_load_from_uri" def) + (string-append def "; skip \"missing XLink schema\";"))))) + (add-after 'install 'set-gem-path + (lambda _ + (setenv "GEM_PATH" (string-append + (getenv "GEM_PATH") ":" + #$output "/lib/ruby/vendor_ruby")))) + (delete 'check) + (add-after 'set-gem-path 'check + (assoc-ref %standard-phases 'check))))) (inputs - (list zlib libxml2)) - (arguments - '(#:gem-flags - (list "--no-document" ; TODO: Re-enable when documentation - ; generation works - "--" - (string-append "--with-xml2-include=" - (assoc-ref %build-inputs "libxml2") - "/include/libxml2" )) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-tests - (lambda _ - (for-each - (lambda (method) - (substitute* "test/test_canonicalize.rb" - (((string-append "def " method) def) - (string-append def "; skip \"CR/LF mismatch\";")))) - '("test_canonicalize_with_w3c_c14n_3_1" - "test_canonicalize_with_w3c_c14n_3_2" - "test_canonicalize_with_w3c_c14n_3_3" - "test_canonicalize_with_w3c_c14n_3_4")) - (substitute* "test/test_schema.rb" - (("def test_schema_load_from_uri" def) - (string-append def "; skip \"missing XLink schema\";"))))) - (delete 'check) - (add-after 'install 'set-gem-path - (lambda* (#:key outputs #:allow-other-keys) - (setenv "GEM_PATH" - (string-append - (getenv "GEM_PATH") ":" - (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")))) - (add-after 'set-gem-path 'check - (assoc-ref %standard-phases 'check))))) - (synopsis "Ruby bindings for GNOME Libxml2") - (description "The Libxml-Ruby project provides Ruby language bindings for -the GNOME Libxml2 XML toolkit.") + (list libxml2 + zlib)) (home-page "https://xml4r.github.com/libxml-ruby") + (synopsis "Ruby bindings for GNOME Libxml2") + (description + "The Libxml-Ruby project provides Ruby language bindings for the GNOME +Libxml2 XML toolkit.") (license license:expat))) (define-public ruby-lino