From 7f4691bad70a716aa6bb0d13f47514f405e8d188 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 29 Aug 2015 08:35:54 -0400 Subject: [PATCH 3/3] gnu: Add ruby-nokogiri. Co-Authored-By: Pjotr Prins * gnu/packages/ruby.scm (ruby-nokogiri): New variable. --- gnu/packages/ruby.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 9e006d6..7d5196a 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -34,6 +34,7 @@ #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (gnu packages xml) #:use-module (guix build-system ruby)) (define-public ruby @@ -672,3 +673,37 @@ standard and simplified way to compile against dependency libraries without messing up your system.") (home-page "http://github.com/flavorjones/mini_portile") (license license:expat))) + +(define-public ruby-nokogiri + (package + (name "ruby-nokogiri") + (version "1.6.6.2") + (source (origin + (method url-fetch) + (uri (rubygems-uri "nokogiri" version)) + (sha256 + (base32 + "1j4qv32qjh67dcrc1yy1h8sqjnny8siyy4s44awla8d6jk361h30")))) + (build-system ruby-build-system) + (arguments + ;; Tests fail because Nokogiri can only test with an installed extension, + ;; and also because many test framework dependencies are missing. + '(#:tests? #f + #:gem-flags (list "--" "--use-system-libraries" + (string-append "--with-xml2-include=" + (assoc-ref %build-inputs "libxml2") + "/include/libxml2" )))) + (native-inputs + `(("ruby-hoe" ,ruby-hoe) + ("ruby-rake-compiler", ruby-rake-compiler))) + (inputs + `(("zlib" ,zlib) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt))) + (propagated-inputs + `(("ruby-mini-portile" ,ruby-mini-portile))) + (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.") + (home-page "http://www.nokogiri.org/") + (license license:expat))) -- 2.5.0