diff options
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 87 |
1 files changed, 31 insertions, 56 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index a2cafbf1f1..6bc8f9e9a1 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3112,24 +3112,40 @@ two hashes.") (home-page "https://github.com/liufengyun/hashdiff") (license license:expat))) -(define-public ruby-hydra +(define-public ruby-hydra-minimal ;; No releases yet. (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525") (revision "0")) (package - (name "ruby-hydra") + (name "ruby-hydra-minimal") (version (git-version "0.0" revision commit)) (home-page "https://github.com/hyphenation/hydra") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit commit))) (file-name (git-file-name name version)) + ;; byebug is a non-essential debugging utility that brings in + ;; many dependencies. + (patches (search-patches "ruby-hydra-minimal-no-byebug.patch")) (sha256 (base32 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f")))) (build-system ruby-build-system) (arguments - '(#:phases (modify-phases %standard-phases + ;; Avoid rspec dependency. + '(#:tests? #f)) + (synopsis "Ruby hyphenation patterns") + (description + "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns. +It is a low-dependency variant of ruby-hydra.") + (license license:expat)))) + +(define-public ruby-hydra + (package + (inherit ruby-hydra-minimal) + (name "ruby-hydra") + (arguments + '(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-files-writable (lambda _ (for-each make-file-writable (find-files ".")) @@ -3137,14 +3153,12 @@ two hashes.") (replace 'check (lambda _ (invoke "rspec")))))) - (native-inputs - (list ruby-rspec)) - (propagated-inputs - (list ruby-byebug)) - (synopsis "Ruby hyphenation patterns") - (description - "ruby-hydra is a Ruby library for working with hyphenation patterns.") - (license license:expat)))) + (native-inputs + (list ruby-rspec)) + (propagated-inputs + (list ruby-byebug)) + (description + "ruby-hydra is a Ruby library for working with hyphenation patterns."))) (define-public ruby-shindo (package @@ -5005,19 +5019,16 @@ to reproduce user environments.") (base32 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy")))))) -;; TODO: In the next rebuild cycle, provide texlive a version of ruby-hydra -;; that does not depend on byebug and rspec, so that their dependencies can -;; be updated more freely. For now pin this version to avoid rebuilds. -(define-public ruby-nokogiri-1.10 +(define-public ruby-nokogiri (package (name "ruby-nokogiri") - (version "1.10.9") + (version "1.12.5") (source (origin (method url-fetch) (uri (rubygems-uri "nokogiri" version)) (sha256 (base32 - "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm")))) + "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b")))) (build-system ruby-build-system) (arguments ;; Tests fail because Nokogiri can only test with an installed extension, @@ -5026,28 +5037,13 @@ to reproduce user environments.") #:gem-flags (list "--" "--use-system-libraries" (string-append "--with-xml2-include=" (assoc-ref %build-inputs "libxml2") - "/include/libxml2" )) - #:phases - (modify-phases %standard-phases - (add-before 'build 'patch-extconf - ;; 'pkg-config' is not included in the GEM_PATH during - ;; installation, so we add it directly to the load path. - (lambda* (#:key inputs #:allow-other-keys) - (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config"))) - (substitute* "ext/nokogiri/extconf.rb" - (("gem 'pkg-config'.*") - (string-append "$:.unshift '" - pkg-config "/lib/ruby/vendor_ruby" - "/gems/pkg-config-" - ,(package-version ruby-pkg-config) - "/lib'\n")))) - #t))))) + "/include/libxml2" )))) (native-inputs (list ruby-hoe)) (inputs (list zlib libxml2 libxslt)) (propagated-inputs - (list ruby-mini-portile-2 ruby-pkg-config)) + (list ruby-mini-portile-2.6.1 ruby-pkg-config)) (synopsis "HTML, XML, SAX, and Reader parser for Ruby") (description "Nokogiri (鋸) parses and searches XML/HTML, and features both CSS3 selector and XPath 1.0 support.") @@ -5066,26 +5062,6 @@ both CSS3 selector and XPath 1.0 support.") (base32 "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq")))))) -(define-public ruby-nokogiri - (package - (inherit ruby-nokogiri-1.10) - (version "1.12.5") - (source (origin - (method url-fetch) - (uri (rubygems-uri "nokogiri" version)) - (sha256 - (base32 - "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b")))) - (arguments - '(#:tests? #f ;XXX: no tests in rubygem - #:gem-flags (list "--" "--use-system-libraries" - (string-append "--with-xml2-include=" - (assoc-ref %build-inputs "libxml2") - "/include/libxml2")))) - (propagated-inputs - (modify-inputs (package-propagated-inputs ruby-nokogiri-1.10) - (replace "ruby-mini-portile" ruby-mini-portile-2.6.1))))) - (define-public ruby-method-source (package (name "ruby-method-source") @@ -6714,8 +6690,7 @@ tree-like structures. It is similar to Ruby's built-in @code{TSort} module.") (build-system ruby-build-system) (propagated-inputs (list ruby-tdiff - ;; Use a fixed version to prevent rebuilds; see ruby-nokogiri TODO. - ruby-nokogiri-1.10)) + ruby-nokogiri)) (native-inputs (list ruby-rspec ruby-yard ruby-rubygems-tasks)) (synopsis "Calculate the differences between two XML/HTML documents") |