From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: [PATCH] gnu: Add ruby 1.8.7 Date: Mon, 27 Oct 2014 00:44:36 +0100 Message-ID: <20141026234436.GA21721@thebird.nl> References: <20141026203111.GA20849@thebird.nl> <87wq7mpfs0.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiXUl-0005PQ-Pw for guix-devel@gnu.org; Sun, 26 Oct 2014 19:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiXUh-0001pF-JW for guix-devel@gnu.org; Sun, 26 Oct 2014 19:45:11 -0400 Content-Disposition: inline In-Reply-To: <87wq7mpfs0.fsf@yeeloong.lan> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org On Sun, Oct 26, 2014 at 07:33:51PM -0400, Mark H Weaver wrote: > Pjotr Prins 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. Is a new package a variable? We used the same message with ruby2. Where can I find these conventions, btw? > > --- > > 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. Good point. It is a remnant of trying things. > > + (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. OK > > + (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. I don't think it is used by 1.8.7. Does that matter? Pj.