unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add ruby 1.8.7 package
@ 2014-10-27  5:30 Pjotr Prins
  2014-10-27  7:24 ` Mark H Weaver
  2015-06-14  8:36 ` Pjotr Prins
  0 siblings, 2 replies; 6+ messages in thread
From: Pjotr Prins @ 2014-10-27  5:30 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

    * gnu/packages/ruby.scm: (ruby-1.8): New variable.

fixes
---
 gnu/packages/ruby.scm |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ac751f5..d6f86a5 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -29,6 +29,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix hash)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ruby))
 
@@ -89,6 +90,34 @@ a focus on simplicity and productivity.")
     (home-page "https://ruby-lang.org")
     (license license:ruby)))
 
+(define-public ruby-1.8
+  (package (inherit ruby)
+    (name "ruby")
+    (version "1.8.7-p374")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/1.8/"
+                           name "-" version ".tar.bz2"))
+     (sha256
+      (base32
+       "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
+    (native-search-paths '())
+    (arguments
+     `(#:test-target "test"
+       #:parallel-tests? #f
+       #:phases
+        (alist-cons-before
+         'configure 'replace-bin-sh
+         (lambda _
+           (substitute* '("Makefile.in"
+                          "ext/pty/pty.c"
+                          "io.c"
+                          "lib/mkmf.rb"
+                          "process.c")
+             (("/bin/sh") (which "sh"))))
+         %standard-phases)))))
+
 (define-public ruby-i18n
   (package
     (name "ruby-i18n")
-- 
1.7.10.4

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

* Re: [PATCH] gnu: Add ruby 1.8.7 package
  2014-10-27  5:30 [PATCH] gnu: Add ruby 1.8.7 package Pjotr Prins
@ 2014-10-27  7:24 ` Mark H Weaver
  2015-06-14  8:36 ` Pjotr Prins
  1 sibling, 0 replies; 6+ messages in thread
From: Mark H Weaver @ 2014-10-27  7:24 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

Pjotr Prins <pjotr.public12@thebird.nl> writes:
>     * gnu/packages/ruby.scm: (ruby-1.8): New variable.

I pushed this with some minor changes to the commit log, and with the
unneeded (guix hash) import removed.  I also followed it up with another
commit making some improvements to the original ruby package.

    Thanks!
      Mark

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

* Re: [PATCH] gnu: Add ruby 1.8.7 package
  2014-10-27  5:30 [PATCH] gnu: Add ruby 1.8.7 package Pjotr Prins
  2014-10-27  7:24 ` Mark H Weaver
@ 2015-06-14  8:36 ` Pjotr Prins
  2015-06-16 15:46   ` Pjotr Prins
  1 sibling, 1 reply; 6+ messages in thread
From: Pjotr Prins @ 2015-06-14  8:36 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

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

Attached a patch for adding Ruby 2.1.6. It works for me. This is to
try developing and supporting gems that do not necessarily work with
(latest) Ruby 2.2.2. It is also useful for the Rails people.

We ought to add Ruby 1.9 too, as well as (eventually) Rubinius (LLVM)
and JRuby (JVM).

It may appear silly to have different Ruby versions, but it is a fact
that not all gems play well on all versions and one of the strengths
of GNU Guix is that you can actually have multiple versions (similar
to what Python needs). If I want to create a gem that only works on
one specific version of Ruby, it should not matter to the end-user.

Pj.

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

From be945cf4d65ab77eb8bd7a462aa0b7d24877ba74 Mon Sep 17 00:00:00 2001
From: pjotrp <pjotr.public01@thebird.nl>
Date: Sat, 13 Jun 2015 13:22:10 +0200
Subject: [PATCH] gnu: Add ruby 2.1.6

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

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 9943de7..f0c645e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -87,6 +87,34 @@ a focus on simplicity and productivity.")
     (home-page "https://ruby-lang.org")
     (license license:ruby)))
 
+(define-public ruby-2.1
+  (package (inherit ruby)
+    (version "2.1.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+                           (version-major+minor version)
+                           "/ruby-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv"))))
+    (native-search-paths '())
+    (arguments
+     `(#:test-target "test"
+       #:parallel-tests? #f
+       #:phases
+        (alist-cons-before
+         'configure 'replace-bin-sh
+         (lambda _
+           (substitute* '("Makefile.in"
+                          "ext/pty/pty.c"
+                          "io.c"
+                          "lib/mkmf.rb"
+                          "process.c")
+             (("/bin/sh") (which "sh"))))
+         %standard-phases)))))
+
 (define-public ruby-1.8
   (package (inherit ruby)
     (version "1.8.7-p374")
-- 
1.7.10.4


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

* Re: [PATCH] gnu: Add ruby 1.8.7 package
  2015-06-14  8:36 ` Pjotr Prins
@ 2015-06-16 15:46   ` Pjotr Prins
  2015-06-16 16:08     ` Thompson, David
  2015-06-19 12:35     ` Thompson, David
  0 siblings, 2 replies; 6+ messages in thread
From: Pjotr Prins @ 2015-06-16 15:46 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

Anything wrong with this patch?

On Sun, Jun 14, 2015 at 10:36:40AM +0200, Pjotr Prins wrote:
> From be945cf4d65ab77eb8bd7a462aa0b7d24877ba74 Mon Sep 17 00:00:00 2001
> From: pjotrp <pjotr.public01@thebird.nl>
> Date: Sat, 13 Jun 2015 13:22:10 +0200
> Subject: [PATCH] gnu: Add ruby 2.1.6
> 
> * gnu/packages/ruby.scm (ruby-2.1): New variable.
> ---
>  gnu/packages/ruby.scm |   28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 9943de7..f0c645e 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -87,6 +87,34 @@ a focus on simplicity and productivity.")
>      (home-page "https://ruby-lang.org")
>      (license license:ruby)))
>  
> +(define-public ruby-2.1
> +  (package (inherit ruby)
> +    (version "2.1.6")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
> +                           (version-major+minor version)
> +                           "/ruby-" version ".tar.bz2"))
> +       (sha256
> +        (base32
> +         "1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv"))))
> +    (native-search-paths '())
> +    (arguments
> +     `(#:test-target "test"
> +       #:parallel-tests? #f
> +       #:phases
> +        (alist-cons-before
> +         'configure 'replace-bin-sh
> +         (lambda _
> +           (substitute* '("Makefile.in"
> +                          "ext/pty/pty.c"
> +                          "io.c"
> +                          "lib/mkmf.rb"
> +                          "process.c")
> +             (("/bin/sh") (which "sh"))))
> +         %standard-phases)))))
> +
>  (define-public ruby-1.8
>    (package (inherit ruby)
>      (version "1.8.7-p374")
> -- 
> 1.7.10.4
> 


-- 

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

* Re: [PATCH] gnu: Add ruby 1.8.7 package
  2015-06-16 15:46   ` Pjotr Prins
@ 2015-06-16 16:08     ` Thompson, David
  2015-06-19 12:35     ` Thompson, David
  1 sibling, 0 replies; 6+ messages in thread
From: Thompson, David @ 2015-06-16 16:08 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Tue, Jun 16, 2015 at 11:46 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
> Anything wrong with this patch?
>
> On Sun, Jun 14, 2015 at 10:36:40AM +0200, Pjotr Prins wrote:
>> From be945cf4d65ab77eb8bd7a462aa0b7d24877ba74 Mon Sep 17 00:00:00 2001
>> From: pjotrp <pjotr.public01@thebird.nl>
>> Date: Sat, 13 Jun 2015 13:22:10 +0200
>> Subject: [PATCH] gnu: Add ruby 2.1.6
>>
>> * gnu/packages/ruby.scm (ruby-2.1): New variable.
>> ---
>>  gnu/packages/ruby.scm |   28 ++++++++++++++++++++++++++++
>>  1 file changed, 28 insertions(+)
>>
>> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
>> index 9943de7..f0c645e 100644
>> --- a/gnu/packages/ruby.scm
>> +++ b/gnu/packages/ruby.scm
>> @@ -87,6 +87,34 @@ a focus on simplicity and productivity.")
>>      (home-page "https://ruby-lang.org")
>>      (license license:ruby)))
>>
>> +(define-public ruby-2.1
>> +  (package (inherit ruby)
>> +    (version "2.1.6")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
>> +                           (version-major+minor version)
>> +                           "/ruby-" version ".tar.bz2"))
>> +       (sha256
>> +        (base32
>> +         "1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv"))))
>> +    (native-search-paths '())
>> +    (arguments
>> +     `(#:test-target "test"
>> +       #:parallel-tests? #f
>> +       #:phases
>> +        (alist-cons-before
>> +         'configure 'replace-bin-sh
>> +         (lambda _
>> +           (substitute* '("Makefile.in"
>> +                          "ext/pty/pty.c"
>> +                          "io.c"
>> +                          "lib/mkmf.rb"
>> +                          "process.c")
>> +             (("/bin/sh") (which "sh"))))
>> +         %standard-phases)))))
>> +
>>  (define-public ruby-1.8
>>    (package (inherit ruby)
>>      (version "1.8.7-p374")
>> --
>> 1.7.10.4
>>

Sorry for the delay.  The only thing I noticed is that you need to add
the native search paths into this recipe, changing 2.2 to 2.1 in the
path directory.

Could you submit an updated patch?  I will test and merge after.  FYI,
I've begun work on a helper procedure to make it easy to make variants
of gem packages that use a different Ruby.  That patch should come
pretty soon.

- Dave

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

* Re: [PATCH] gnu: Add ruby 1.8.7 package
  2015-06-16 15:46   ` Pjotr Prins
  2015-06-16 16:08     ` Thompson, David
@ 2015-06-19 12:35     ` Thompson, David
  1 sibling, 0 replies; 6+ messages in thread
From: Thompson, David @ 2015-06-19 12:35 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Tue, Jun 16, 2015 at 11:46 AM, Pjotr Prins <pjotr.public12@thebird.nl> wrote:
> Anything wrong with this patch?
>
> On Sun, Jun 14, 2015 at 10:36:40AM +0200, Pjotr Prins wrote:
>> From be945cf4d65ab77eb8bd7a462aa0b7d24877ba74 Mon Sep 17 00:00:00 2001
>> From: pjotrp <pjotr.public01@thebird.nl>
>> Date: Sat, 13 Jun 2015 13:22:10 +0200
>> Subject: [PATCH] gnu: Add ruby 2.1.6
>>
>> * gnu/packages/ruby.scm (ruby-2.1): New variable.

I added the necessary native search path and pushed.  Thanks!

- Dave

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

end of thread, other threads:[~2015-06-19 12:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27  5:30 [PATCH] gnu: Add ruby 1.8.7 package Pjotr Prins
2014-10-27  7:24 ` Mark H Weaver
2015-06-14  8:36 ` Pjotr Prins
2015-06-16 15:46   ` Pjotr Prins
2015-06-16 16:08     ` Thompson, David
2015-06-19 12:35     ` Thompson, David

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).