all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Cc: pjotr.public01@thebird.nl
Subject: [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar
Date: Sat, 29 Aug 2015 08:57:38 -0400	[thread overview]
Message-ID: <877foep7zx.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-ruby-minitar.patch --]
[-- Type: text/x-patch, Size: 1455 bytes --]

From c043d79f1b66c90b20652632880d67d8fcc5275e Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-ruby-mini-portile.patch --]
[-- Type: text/x-patch, Size: 1659 bytes --]

From bd6a2e115585064e2978adfa7860c253ebb68834 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
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


[-- Attachment #4: 0003-gnu-Add-ruby-nokogiri.patch --]
[-- Type: text/x-patch, Size: 2430 bytes --]

From 7f4691bad70a716aa6bb0d13f47514f405e8d188 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Sat, 29 Aug 2015 08:35:54 -0400
Subject: [PATCH 3/3] gnu: Add ruby-nokogiri.

Co-Authored-By: Pjotr Prins <pjotr.public01@thebird.nl>

* 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


             reply	other threads:[~2015-08-29 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29 12:57 David Thompson [this message]
2015-09-06  0:27 ` [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar Thompson, David
2015-09-06 13:53   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877foep7zx.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public01@thebird.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.