guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Add ruby 1.8.7


From: Mark H Weaver
Subject: Re: [PATCH] gnu: Add ruby 1.8.7
Date: Sun, 26 Oct 2014 19:33:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Pjotr Prins <address@hidden> writes:
>     * gnu/packages/ruby.scm: Added older Ruby 1.8.7

According to our conventions, this should be:

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

> ---
>  gnu/packages/ruby.scm |   27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index ac751f5..31cbe54 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -89,6 +89,33 @@ 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")

Is there a reason to repeat the 'name' field here?
It should be inherited.

> +    (version "1.8.7-p374")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "ftp://ftp.ruby-lang.org/pub/ruby/1.8/";
> +                           name "-" version ".tar.bz2"))

In the ruby-2.1.3 package description, we used the http URI starting
with "http://cache.ruby-lang.org/pub/ruby/";.  It's probably better to
use that one, since 'http' has some advantages and our http client is
more robust.

> +     (sha256
> +      (base32
> +       "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
> +    (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)))))

It looks like the 'native-search-paths' field needs to be overridden,
since the existing one has "2.1.3" in it.

     Thanks!
       Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]