From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar Date: Sat, 29 Aug 2015 08:57:38 -0400 Message-ID: <877foep7zx.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVfhW-0002lz-Of for guix-devel@gnu.org; Sat, 29 Aug 2015 08:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVfhV-0008U2-3u for guix-devel@gnu.org; Sat, 29 Aug 2015 08:57:42 -0400 Received: from mail.fsf.org ([208.118.235.13]:46851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVfhU-0008Tq-QM for guix-devel@gnu.org; Sat, 29 Aug 2015 08:57:41 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: pjotr.public01@thebird.nl --=-=-= Content-Type: text/plain This small patch set adds a few more Ruby libraries to our arsenal, the most important being Nokogiri: A widely used XML parsing library with native C extensions. The official Ruby packaging system cannot capture non-Ruby dependencies outside of developers bundling them in their source releases, so the ruby-nokogiri package is a great example of how Guix improves upon language-specific package managers. As a user of Nokogiri, it's nice to be able to run: guix environment --ad-hoc ruby ruby-nokogiri -E irb And get a Ruby REPL with Nokogiri without having to manually install libxml2, libxslt, and the GCC toolchain from the system package manager and hoped that things were ABI compatible when 'gem install nokogiri' compiled the extension. Thanks to Pjotr for writing the initial version of the Nokogiri package and being patient for the couple of months it took me to get it reviewed and updated for the new Ruby build system. Patches below: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-ruby-minitar.patch >From c043d79f1b66c90b20652632880d67d8fcc5275e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 29 Aug 2015 08:32:32 -0400 Subject: [PATCH 1/3] gnu: Add ruby-minitar. * gnu/packages/ruby.scm (ruby-minitar): New variable. --- gnu/packages/ruby.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 9a702dd..4afc0bc 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -628,3 +628,24 @@ net/http library.") (description "Arel is a SQL AST manager for Ruby. It simplifies the generation of complex SQL queries and is compatible with various RDBMSes.") (license license:expat))) + +(define-public ruby-minitar + (package + (name "ruby-minitar") + (version "0.5.4") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "minitar" version)) + (sha256 + (base32 + "1vpdjfmdq1yc4i620frfp9af02ia435dnpj8ybsd7dc3rypkvbka")))) + (build-system ruby-build-system) + (arguments + '(#:tests? #f)) ; missing a gemspec + (synopsis "Ruby library and utility for handling tar archives") + (description + "Archive::Tar::Minitar is a pure-Ruby library and command-line utility +that provides the ability to deal with POSIX tar archive files.") + (home-page "http://www.github.com/atoulme/minitar") + (license (list license:gpl2+ license:ruby)))) -- 2.5.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-ruby-mini-portile.patch >From bd6a2e115585064e2978adfa7860c253ebb68834 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 29 Aug 2015 08:32:56 -0400 Subject: [PATCH 2/3] gnu: Add ruby-mini-portile. * gnu/packages/ruby.scm (ruby-mini-portile): New variable. --- gnu/packages/ruby.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 4afc0bc..9e006d6 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -649,3 +649,26 @@ generation of complex SQL queries and is compatible with various RDBMSes.") that provides the ability to deal with POSIX tar archive files.") (home-page "http://www.github.com/atoulme/minitar") (license (list license:gpl2+ license:ruby)))) + +(define-public ruby-mini-portile + (package + (name "ruby-mini-portile") + (version "0.6.2") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "mini_portile" version)) + (sha256 + (base32 + "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w")))) + (build-system ruby-build-system) + (arguments + '(#:tests? #f)) ; tests require network access + (synopsis "Simplistic port-like solution for developers. It provides a +standard and simplified way to compile against dependency libraries without +messing up your system.") + (description "Simplistic port-like solution for developers. It provides a +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))) -- 2.5.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0003-gnu-Add-ruby-nokogiri.patch Content-Transfer-Encoding: quoted-printable >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)) =20 (define-public ruby @@ -672,3 +673,37 @@ standard and simplified way to compile against depende= ncy 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 extens= ion, + ;; and also because many test framework dependencies are missing. + '(#:tests? #f + #:gem-flags (list "--" "--use-system-libraries" + (string-append "--with-xml2-include=3D" + (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 (=E9=8B=B8) parses and searches XML/HTML, and f= eatures +both CSS3 selector and XPath 1.0 support.") + (home-page "http://www.nokogiri.org/") + (license license:expat))) --=20 2.5.0 --=-=-=--