all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar
@ 2015-08-29 12:57 David Thompson
  2015-09-06  0:27 ` Thompson, David
  0 siblings, 1 reply; 3+ messages in thread
From: David Thompson @ 2015-08-29 12:57 UTC (permalink / raw)
  To: guix-devel; +Cc: pjotr.public01

[-- 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar
  2015-08-29 12:57 [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar David Thompson
@ 2015-09-06  0:27 ` Thompson, David
  2015-09-06 13:53   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Thompson, David @ 2015-09-06  0:27 UTC (permalink / raw)
  To: guix-devel; +Cc: Pjotr Prins

On Sat, Aug 29, 2015 at 8:57 AM, David Thompson
<dthompson2@worcester.edu> wrote:
> 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.

I decided to push these patches because they're pretty simple.  Just
one tweak: I added a real synopsis and description to
ruby-mini-portile.

- Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar
  2015-09-06  0:27 ` Thompson, David
@ 2015-09-06 13:53   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-09-06 13:53 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel, Pjotr Prins

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Sat, Aug 29, 2015 at 8:57 AM, David Thompson
> <dthompson2@worcester.edu> wrote:
>> 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.
>
> I decided to push these patches because they're pretty simple.  Just
> one tweak: I added a real synopsis and description to
> ruby-mini-portile.

OK, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-06 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-29 12:57 [PATCHES] Add ruby-nokogiri, ruby-mini-portile, and ruby-minitar David Thompson
2015-09-06  0:27 ` Thompson, David
2015-09-06 13:53   ` Ludovic Courtès

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.