unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH]     gnu: Add ruby-libxml and bioruby.
@ 2015-09-15 12:15 Pjotr Prins
  2015-09-15 12:58 ` Thompson, David
  0 siblings, 1 reply; 12+ messages in thread
From: Pjotr Prins @ 2015-09-15 12:15 UTC (permalink / raw)
  To: guix-devel

    * gnu/packages/ruby.scm (ruby-libxml): New variable.
    * gnu/packages/bioinformatics.scm (bioruby): New variable.
---
 gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/ruby.scm           | 26 +++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1f34211..b297ef2 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2642,3 +2642,50 @@ position for indels.  Bio-locus allows users to store this chr+pos or
 chr+pos+alt information in a database.")
     (home-page "https://github.com/pjotrp/bio-locus")
     (license license:expat)))
+
+(define-public bioruby
+  (package
+    (name "bioruby")
+    (version "1.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "bio" version))
+        (sha256
+          (base32
+            "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
+    (build-system ruby-build-system)
+    (native-inputs `(("ruby-libxml" ,ruby-libxml)))
+    (inputs
+     `(("coreutils" ,coreutils)  ; required for /bin/echo in tests
+       ("which" ,which)))        ; required for tests
+    (arguments
+     `(#:phases
+        (alist-cons-before
+         'build 'replace-sh-commands
+         (lambda _
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/sh") (which "sh")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/ls") (which "ls")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("which") (which "which")))
+           (substitute* '("test/functional/bio/test_command.rb",
+                          "test/data/command/echoarg2.sh")
+             (("/bin/echo") (which "echo"))))
+         %standard-phases)))
+    (synopsis
+      "Ruby library, shell and utilities for bioinformatics")
+    (description
+      "BioRuby comes with a comprehensive set of free development
+tools and libraries for bioinformatics and molecular biology, for the
+Ruby programming language.  BioRuby has components for sequence
+analysis, pathway analysis, protein modelling and phylogenetic
+analysis; it supports many widely used data formats and provides easy
+access to databases, external programs and public web services,
+including BLAST, KEGG, GenBank, MEDLINE and GO.")
+    (home-page "http://bioruby.org/")
+    ;; Code is released under Ruby license, except for setup
+    ;; (LGPLv2.1+), scripts in samples (GPL2 and GPL2+)
+    (license (list license:ruby license:lgpl2.1+ license:gpl2
+                   license:gpl2+ ))))
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ee0acc8..1ca5f96 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -465,6 +465,32 @@ extensions.")
     (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
     (license license:public-domain)))
 
+(define-public ruby-libxml
+  (package
+    (name "ruby-libxml")
+    (version "2.8.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "libxml-ruby" version))
+        (sha256
+          (base32
+            "1dhjqp4r9vkdp00l6h1cj8qfndzxlhlxk6b9g0w4v55gz857ilhb"))))
+    (build-system ruby-build-system)
+    (inputs `(("zlib" ,zlib)
+              ("libxml2" ,libxml2)))
+    (arguments
+     '(#:tests? #f  ; tests need installation of build first
+       #:gem-flags (list "--"
+                         (string-append "--with-xml2-include="
+                                        (assoc-ref %build-inputs "libxml2")
+                                        "/include/libxml2" ))))
+    (synopsis "Ruby bindings for the GNOME Libxml2 XML toolkit")
+    (description "The Libxml-Ruby project provides Ruby language
+bindings for the GNOME Libxml2 XML toolkit.")
+    (home-page "http://xml4r.github.com/libxml-ruby")
+    (license license:expat)))
+
 (define-public ruby-xml-simple
   (package
     (name "ruby-xml-simple")
-- 
2.4.3

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

* [PATCH]     gnu: Add ruby-libxml and bioruby.
@ 2015-09-15 12:16 Pjotr Prins
  2015-09-15 12:24 ` Pjotr Prins
  0 siblings, 1 reply; 12+ messages in thread
From: Pjotr Prins @ 2015-09-15 12:16 UTC (permalink / raw)
  To: guix-devel

    * gnu/packages/ruby.scm (ruby-libxml): New variable.
    * gnu/packages/bioinformatics.scm (bioruby): New variable.
---
 gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/ruby.scm           | 26 +++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1f34211..b297ef2 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2642,3 +2642,50 @@ position for indels.  Bio-locus allows users to store this chr+pos or
 chr+pos+alt information in a database.")
     (home-page "https://github.com/pjotrp/bio-locus")
     (license license:expat)))
+
+(define-public bioruby
+  (package
+    (name "bioruby")
+    (version "1.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "bio" version))
+        (sha256
+          (base32
+            "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
+    (build-system ruby-build-system)
+    (native-inputs `(("ruby-libxml" ,ruby-libxml)))
+    (inputs
+     `(("coreutils" ,coreutils)  ; required for /bin/echo in tests
+       ("which" ,which)))        ; required for tests
+    (arguments
+     `(#:phases
+        (alist-cons-before
+         'build 'replace-sh-commands
+         (lambda _
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/sh") (which "sh")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/ls") (which "ls")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("which") (which "which")))
+           (substitute* '("test/functional/bio/test_command.rb",
+                          "test/data/command/echoarg2.sh")
+             (("/bin/echo") (which "echo"))))
+         %standard-phases)))
+    (synopsis
+      "Ruby library, shell and utilities for bioinformatics")
+    (description
+      "BioRuby comes with a comprehensive set of free development
+tools and libraries for bioinformatics and molecular biology, for the
+Ruby programming language.  BioRuby has components for sequence
+analysis, pathway analysis, protein modelling and phylogenetic
+analysis; it supports many widely used data formats and provides easy
+access to databases, external programs and public web services,
+including BLAST, KEGG, GenBank, MEDLINE and GO.")
+    (home-page "http://bioruby.org/")
+    ;; Code is released under Ruby license, except for setup
+    ;; (LGPLv2.1+), scripts in samples (GPL2 and GPL2+)
+    (license (list license:ruby license:lgpl2.1+ license:gpl2
+                   license:gpl2+ ))))
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ee0acc8..1ca5f96 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -465,6 +465,32 @@ extensions.")
     (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
     (license license:public-domain)))
 
+(define-public ruby-libxml
+  (package
+    (name "ruby-libxml")
+    (version "2.8.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "libxml-ruby" version))
+        (sha256
+          (base32
+            "1dhjqp4r9vkdp00l6h1cj8qfndzxlhlxk6b9g0w4v55gz857ilhb"))))
+    (build-system ruby-build-system)
+    (inputs `(("zlib" ,zlib)
+              ("libxml2" ,libxml2)))
+    (arguments
+     '(#:tests? #f  ; tests need installation of build first
+       #:gem-flags (list "--"
+                         (string-append "--with-xml2-include="
+                                        (assoc-ref %build-inputs "libxml2")
+                                        "/include/libxml2" ))))
+    (synopsis "Ruby bindings for the GNOME Libxml2 XML toolkit")
+    (description "The Libxml-Ruby project provides Ruby language
+bindings for the GNOME Libxml2 XML toolkit.")
+    (home-page "http://xml4r.github.com/libxml-ruby")
+    (license license:expat)))
+
 (define-public ruby-xml-simple
   (package
     (name "ruby-xml-simple")
-- 
2.4.3

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

* Re: [PATCH]     gnu: Add ruby-libxml and bioruby.
  2015-09-15 12:16 Pjotr Prins
@ 2015-09-15 12:24 ` Pjotr Prins
  0 siblings, 0 replies; 12+ messages in thread
From: Pjotr Prins @ 2015-09-15 12:24 UTC (permalink / raw)
  To: guix-devel

Sorry for the double mail. I just got round to using command line
mailing patches and hit enter twice. 

Anyway, the bioruby package works with many tests :). 

ruby-libxml, meanwhile, installs fine but its tests depend on the
shared library that needs to get built and installed. Anyone dealt
with such a dependency in the check phase? For now the testing is
disabled.

Thanks,

Pj.

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 12:15 [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
@ 2015-09-15 12:58 ` Thompson, David
  2015-09-15 13:19   ` Pjotr Prins
  2015-09-15 13:44   ` Pjotr Prins
  0 siblings, 2 replies; 12+ messages in thread
From: Thompson, David @ 2015-09-15 12:58 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Tue, Sep 15, 2015 at 8:15 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
>     * gnu/packages/ruby.scm (ruby-libxml): New variable.
>     * gnu/packages/bioinformatics.scm (bioruby): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++++++++++++
>  gnu/packages/ruby.scm           | 26 +++++++++++++++++++++++
>  2 files changed, 73 insertions(+)

One package per patch, please.

> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 1f34211..b297ef2 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -2642,3 +2642,50 @@ position for indels.  Bio-locus allows users to store this chr+pos or
>  chr+pos+alt information in a database.")
>      (home-page "https://github.com/pjotrp/bio-locus")
>      (license license:expat)))
> +
> +(define-public bioruby
> +  (package
> +    (name "bioruby")
> +    (version "1.5.0")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (rubygems-uri "bio" version))
> +        (sha256
> +          (base32
> +            "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
> +    (build-system ruby-build-system)
> +    (native-inputs `(("ruby-libxml" ,ruby-libxml)))

This should be a propagated input.

> +    (inputs
> +     `(("coreutils" ,coreutils)  ; required for /bin/echo in tests

Coreutils is an implict input to the Ruby build system.

> +       ("which" ,which)))        ; required for tests

This should be a native input since it's only needed at build time.

> +    (arguments
> +     `(#:phases
> +        (alist-cons-before
> +         'build 'replace-sh-commands
> +         (lambda _
> +           (substitute* '("test/functional/bio/test_command.rb")
> +             (("/bin/sh") (which "sh")))
> +           (substitute* '("test/functional/bio/test_command.rb")
> +             (("/bin/ls") (which "ls")))
> +           (substitute* '("test/functional/bio/test_command.rb")
> +             (("which") (which "which")))
> +           (substitute* '("test/functional/bio/test_command.rb",
> +                          "test/data/command/echoarg2.sh")
> +             (("/bin/echo") (which "echo"))))
> +         %standard-phases)))
> +    (synopsis
> +      "Ruby library, shell and utilities for bioinformatics")
> +    (description
> +      "BioRuby comes with a comprehensive set of free development

Everything in Guix is necessarily free, so we like to keep "free",
"open", etc. out of package descriptions.

> +tools and libraries for bioinformatics and molecular biology, for the
> +Ruby programming language.  BioRuby has components for sequence
> +analysis, pathway analysis, protein modelling and phylogenetic
> +analysis; it supports many widely used data formats and provides easy
> +access to databases, external programs and public web services,
> +including BLAST, KEGG, GenBank, MEDLINE and GO.")
> +    (home-page "http://bioruby.org/")
> +    ;; Code is released under Ruby license, except for setup
> +    ;; (LGPLv2.1+), scripts in samples (GPL2 and GPL2+)
> +    (license (list license:ruby license:lgpl2.1+ license:gpl2
> +                   license:gpl2+ ))))

Wouldn't this make the collective work GPL2+?  Ludo or Mark, can you
weigh in here?

> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index ee0acc8..1ca5f96 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -465,6 +465,32 @@ extensions.")
>      (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
>      (license license:public-domain)))
>
> +(define-public ruby-libxml
> +  (package
> +    (name "ruby-libxml")
> +    (version "2.8.0")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (rubygems-uri "libxml-ruby" version))
> +        (sha256
> +          (base32
> +            "1dhjqp4r9vkdp00l6h1cj8qfndzxlhlxk6b9g0w4v55gz857ilhb"))))
> +    (build-system ruby-build-system)
> +    (inputs `(("zlib" ,zlib)
> +              ("libxml2" ,libxml2)))
> +    (arguments
> +     '(#:tests? #f  ; tests need installation of build first

Usually gems with native extensions just redundantly build themselves
in the source directory before running tests, which I guess is not the
case here.

It looks like you need to at least add ruby-rake-compiler to
native-inputs and run 'rake compile' before running the tests.  I
tried to do this outside the build container from a git checkout and
several tests failed.  Give it a shot in the build recipe and see how
it goes.  If the problems are very difficult to solve, we can leave
the tests disabled with a note about the failures and problems to
solve.

Unfortunately, it seems there's no way to avoid compiling native
extensions twice when we do run tests since it needs to be compiled in
the source tree for tests, and then again when running 'gem install'.
The Ruby way of building things leaves much to be desired.


> +       #:gem-flags (list "--"
> +                         (string-append "--with-xml2-include="
> +                                        (assoc-ref %build-inputs "libxml2")
> +                                        "/include/libxml2" ))))
> +    (synopsis "Ruby bindings for the GNOME Libxml2 XML toolkit")
> +    (description "The Libxml-Ruby project provides Ruby language
> +bindings for the GNOME Libxml2 XML toolkit.")
> +    (home-page "http://xml4r.github.com/libxml-ruby")
> +    (license license:expat)))
> +
>  (define-public ruby-xml-simple
>    (package
>      (name "ruby-xml-simple")
> --
> 2.4.3

Could you look into the above issues and send updated patches?
Thanks!

- Dave

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 12:58 ` Thompson, David
@ 2015-09-15 13:19   ` Pjotr Prins
  2015-09-15 14:39     ` Thompson, David
  2015-09-15 13:44   ` Pjotr Prins
  1 sibling, 1 reply; 12+ messages in thread
From: Pjotr Prins @ 2015-09-15 13:19 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

On Tue, Sep 15, 2015 at 08:58:28AM -0400, Thompson, David wrote:
> > +    (native-inputs `(("ruby-libxml" ,ruby-libxml)))
> 
> This should be a propagated input.

oops. I can be such a noob.

> > +    (inputs
> > +     `(("coreutils" ,coreutils)  ; required for /bin/echo in tests
> 
> Coreutils is an implict input to the Ruby build system.

well, echo is not found by which, so coreutils is missing.

> > +       ("which" ,which)))        ; required for tests
> 
> This should be a native input since it's only needed at build time.

OK.

> Usually gems with native extensions just redundantly build themselves
> in the source directory before running tests, which I guess is not the
> case here.
> 
> It looks like you need to at least add ruby-rake-compiler to
> native-inputs and run 'rake compile' before running the tests. 

I tried that.

> I tried to do this outside the build container from a git checkout
> and several tests failed.  Give it a shot in the build recipe and
> see how it goes.  If the problems are very difficult to solve, we
> can leave the tests disabled with a note about the failures and
> problems to solve.

No dice.

> Unfortunately, it seems there's no way to avoid compiling native
> extensions twice when we do run tests since it needs to be compiled in
> the source tree for tests, and then again when running 'gem install'.
> The Ruby way of building things leaves much to be desired.

Aye. Tests assume an already installed extension. The good news is
that bioruby tests include ruby-libxml tests. So, at least, the
integration works.

Pj.

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 12:58 ` Thompson, David
  2015-09-15 13:19   ` Pjotr Prins
@ 2015-09-15 13:44   ` Pjotr Prins
  1 sibling, 0 replies; 12+ messages in thread
From: Pjotr Prins @ 2015-09-15 13:44 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

On Tue, Sep 15, 2015 at 08:58:28AM -0400, Thompson, David wrote:
> > +    (home-page "http://bioruby.org/")
> > +    ;; Code is released under Ruby license, except for setup
> > +    ;; (LGPLv2.1+), scripts in samples (GPL2 and GPL2+)
> > +    (license (list license:ruby license:lgpl2.1+ license:gpl2
> > +                   license:gpl2+ ))))
> 
> Wouldn't this make the collective work GPL2+?  Ludo or Mark, can you
> weigh in here?

I don't think so. 98% of the code is under the Ruby license, including
the libraries and the Ruby shell. Only a few small scripts have other
licenses. I would argue these scripts are hardly used, including setup
:)

Pj.

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 13:19   ` Pjotr Prins
@ 2015-09-15 14:39     ` Thompson, David
  2015-09-17  5:24       ` Pjotr Prins
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Thompson, David @ 2015-09-15 14:39 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Tue, Sep 15, 2015 at 9:19 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
> On Tue, Sep 15, 2015 at 08:58:28AM -0400, Thompson, David wrote:
>> > +    (native-inputs `(("ruby-libxml" ,ruby-libxml)))
>>
>> This should be a propagated input.
>
> oops. I can be such a noob.

No worries. :)

>> > +    (inputs
>> > +     `(("coreutils" ,coreutils)  ; required for /bin/echo in tests
>>
>> Coreutils is an implict input to the Ruby build system.
>
> well, echo is not found by which, so coreutils is missing.

That is odd.  Coreutils is most definitely there.  I added this to a
build phase of another Ruby package and rebuilt it:

    (pk 'ECHO (which "echo"))

And the file name for echo was indeed displayed.

>> Usually gems with native extensions just redundantly build themselves
>> in the source directory before running tests, which I guess is not the
>> case here.
>>
>> It looks like you need to at least add ruby-rake-compiler to
>> native-inputs and run 'rake compile' before running the tests.
>
> I tried that.

Ah, damn.  Well let's not worry about it too much, then.

>> I tried to do this outside the build container from a git checkout
>> and several tests failed.  Give it a shot in the build recipe and
>> see how it goes.  If the problems are very difficult to solve, we
>> can leave the tests disabled with a note about the failures and
>> problems to solve.
>
> No dice.
>
>> Unfortunately, it seems there's no way to avoid compiling native
>> extensions twice when we do run tests since it needs to be compiled in
>> the source tree for tests, and then again when running 'gem install'.
>> The Ruby way of building things leaves much to be desired.
>
> Aye. Tests assume an already installed extension. The good news is
> that bioruby tests include ruby-libxml tests. So, at least, the
> integration works.

OK, cool.  That sounds good enough, then.

One more thing that I forgot: Use the 'modify-phases' syntax instead
of 'alist-cons-before' for the build phases.

Thanks!

- Dave

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 14:39     ` Thompson, David
@ 2015-09-17  5:24       ` Pjotr Prins
  2015-09-17  5:37       ` [PATCH] gnu: Add ruby-libxml Pjotr Prins
  2015-09-17  6:17       ` [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
  2 siblings, 0 replies; 12+ messages in thread
From: Pjotr Prins @ 2015-09-17  5:24 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

On Tue, Sep 15, 2015 at 10:39:56AM -0400, Thompson, David wrote:
> That is odd.  Coreutils is most definitely there.  I added this to a
> build phase of another Ruby package and rebuilt it:
> 
>     (pk 'ECHO (which "echo"))
> 
> And the file name for echo was indeed displayed.

That is a useful trick :)

Pj.

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

* Re: [PATCH] gnu: Add ruby-libxml
  2015-09-15 14:39     ` Thompson, David
  2015-09-17  5:24       ` Pjotr Prins
@ 2015-09-17  5:37       ` Pjotr Prins
  2015-09-19 16:34         ` Thompson, David
  2015-09-17  6:17       ` [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
  2 siblings, 1 reply; 12+ messages in thread
From: Pjotr Prins @ 2015-09-17  5:37 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

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

Please push if OK.


[-- Attachment #2: 0001-gnu-Add-ruby-libxml.patch --]
[-- Type: text/x-diff, Size: 1728 bytes --]

From 6ef3fbc9fea7ec68def9b66f6091bc4b0423e78c Mon Sep 17 00:00:00 2001
Date: Tue, 15 Sep 2015 13:32:34 +0000
Subject: [PATCH] gnu: Add ruby-libxml
To: guix-devel@gnu.org
From: Pjotr Prins <pjotr.public12@thebird.nl>

* gnu/packages/ruby.scm (ruby-libxml): New variable.
---
 gnu/packages/ruby.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ee0acc8..507ce2f 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -465,6 +465,32 @@ extensions.")
     (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
     (license license:public-domain)))
 
+(define-public ruby-libxml
+  (package
+    (name "ruby-libxml")
+    (version "2.8.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "libxml-ruby" version))
+        (sha256
+          (base32
+           "1dhjqp4r9vkdp00l6h1cj8qfndzxlhlxk6b9g0w4v55gz857ilhb"))))
+    (build-system ruby-build-system)
+    (inputs `(("zlib" ,zlib)
+              ("libxml2" ,libxml2)))
+    (arguments
+     '(#:tests? #f  ; tests need installation of build first
+       #:gem-flags (list "--"
+                         (string-append "--with-xml2-include="
+                                        (assoc-ref %build-inputs "libxml2")
+                                        "/include/libxml2" ))))
+    (synopsis "Ruby bindings for the GNOME Libxml2 XML toolkit")
+    (description "The Libxml-Ruby project provides Ruby language
+bindings for the GNOME Libxml2 XML toolkit.")
+    (home-page "http://xml4r.github.com/libxml-ruby")
+    (license license:expat)))
+
 (define-public ruby-xml-simple
   (package
     (name "ruby-xml-simple")
-- 
2.4.3


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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-15 14:39     ` Thompson, David
  2015-09-17  5:24       ` Pjotr Prins
  2015-09-17  5:37       ` [PATCH] gnu: Add ruby-libxml Pjotr Prins
@ 2015-09-17  6:17       ` Pjotr Prins
  2015-09-19 16:42         ` Thompson, David
  2 siblings, 1 reply; 12+ messages in thread
From: Pjotr Prins @ 2015-09-17  6:17 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

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

BioRuby patch updated.

Pj.


[-- Attachment #2: 0001-gnu-Add-ruby-libxml-and-bioruby.patch --]
[-- Type: text/x-diff, Size: 2771 bytes --]

From dd1fb03349d2ba2e7f36252d68f3de11f21b8866 Mon Sep 17 00:00:00 2001
Date: Thu, 17 Sep 2015 06:17:44 +0000
Subject: [PATCH] gnu: Add ruby-libxml and bioruby.
To: guix-devel@gnu.org
From: Pjotr Prins <pjotr.public12@thebird.nl>

* gnu/packages/bioinformatics.scm (bioruby): New variable.
---
 gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1f34211..5df77a9 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2642,3 +2642,50 @@ position for indels.  Bio-locus allows users to store this chr+pos or
 chr+pos+alt information in a database.")
     (home-page "https://github.com/pjotrp/bio-locus")
     (license license:expat)))
+
+(define-public bioruby
+  (package
+    (name "bioruby")
+    (version "1.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (rubygems-uri "bio" version))
+        (sha256
+          (base32
+           "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
+    (build-system ruby-build-system)
+    (propagated-inputs `(("ruby-libxml" ,ruby-libxml)))
+    (native-inputs
+     `(("which" ,which)))  ; required for test phase
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+          'build 'patch-test-command
+         (lambda _
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/sh") (which "sh")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("/bin/ls") (which "ls")))
+           (substitute* '("test/functional/bio/test_command.rb")
+             (("which") (which "which")))
+           (substitute* '("test/functional/bio/test_command.rb",
+                          "test/data/command/echoarg2.sh")
+             (("/bin/echo") (which "echo")))
+         #t)))))
+    (synopsis
+      "Ruby library, shell and utilities for bioinformatics")
+    (description
+      "BioRuby comes with a comprehensive set of development tools and
+libraries for bioinformatics and molecular biology, for the Ruby
+programming language.  BioRuby has components for sequence analysis,
+pathway analysis, protein modelling and phylogenetic analysis; it
+supports many widely used data formats and provides easy access to
+databases, external programs and public web services, including BLAST,
+KEGG, GenBank, MEDLINE and GO.")
+    (home-page "http://bioruby.org/")
+    ;; Code is released under Ruby license, except for setup
+    ;; (LGPLv2.1+) and scripts in samples (which have GPL2 and GPL2+)
+    (license (list license:ruby license:lgpl2.1+ license:gpl2
+                   license:gpl2+ ))))
-- 
2.4.3


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

* Re: [PATCH] gnu: Add ruby-libxml
  2015-09-17  5:37       ` [PATCH] gnu: Add ruby-libxml Pjotr Prins
@ 2015-09-19 16:34         ` Thompson, David
  0 siblings, 0 replies; 12+ messages in thread
From: Thompson, David @ 2015-09-19 16:34 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Thu, Sep 17, 2015 at 1:37 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
> Please push if OK.

I cleaned a few things up and pushed.  Thanks.

- Dave

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

* Re: [PATCH] gnu: Add ruby-libxml and bioruby.
  2015-09-17  6:17       ` [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
@ 2015-09-19 16:42         ` Thompson, David
  0 siblings, 0 replies; 12+ messages in thread
From: Thompson, David @ 2015-09-19 16:42 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Thu, Sep 17, 2015 at 2:17 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
> BioRuby patch updated.

Awesome!  Happy to see that all the tests passed.  Cleaned it up a bit
and pushed.

- Dave

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

end of thread, other threads:[~2015-09-19 16:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 12:15 [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
2015-09-15 12:58 ` Thompson, David
2015-09-15 13:19   ` Pjotr Prins
2015-09-15 14:39     ` Thompson, David
2015-09-17  5:24       ` Pjotr Prins
2015-09-17  5:37       ` [PATCH] gnu: Add ruby-libxml Pjotr Prins
2015-09-19 16:34         ` Thompson, David
2015-09-17  6:17       ` [PATCH] gnu: Add ruby-libxml and bioruby Pjotr Prins
2015-09-19 16:42         ` Thompson, David
2015-09-15 13:44   ` Pjotr Prins
  -- strict thread matches above, loose matches on Subject: below --
2015-09-15 12:16 Pjotr Prins
2015-09-15 12:24 ` Pjotr Prins

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).