From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: [PATCH] New ruby package Date: Sat, 27 Sep 2014 14:29:03 +0200 Message-ID: <20140927122903.GA3999@thebird.nl> References: <20140504175144.GA28798@thebird.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXr8H-0004Z9-AK for guix-devel@gnu.org; Sat, 27 Sep 2014 08:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXr8D-0005h3-Cu for guix-devel@gnu.org; Sat, 27 Sep 2014 08:29:49 -0400 Received: from mail.thebird.nl ([95.154.246.10]:57283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXr8D-0005gP-2I for guix-devel@gnu.org; Sat, 27 Sep 2014 08:29:45 -0400 Content-Disposition: inline In-Reply-To: <20140504175144.GA28798@thebird.nl> 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: guix-devel --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Working Ruby package. Next step is to get gems working locally. --Nq2Wo0NMKNjxTN9z Content-Type: text/x-diff; charset=iso-8859-1 Content-Disposition: attachment; filename="ruby-new.patch" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm new file mode 100644 index 0000000..a13606c --- /dev/null +++ b/gnu/packages/ruby.scm @@ -0,0 +1,99 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2014 Pjotr Prins +;;; Copyright =C2=A9 2014 Ludovic Court=C3=A8s +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages ruby) + #:use-module ((guix licenses) + #:select (rl)) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages readline) + #:use-module (gnu packages openssl) + #:use-module (gnu packages autotools) + #:use-module (gnu packages libffi) + #:use-module (gnu packages gdbm) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix build-system gnu) +;;; #:use-module (guix build-system trivial)) +) + +(define-public ruby + (package + (name "ruby") + (version "2.1.3") + (source + (origin + (method url-fetch) + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/2.1/" + "ruby-" version ".tar.gz")) + ;;; (patch-flags '("p76")) + (sha256 + (base32 + "00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:parallel-tests? #f + #:phases + (alist-cons-after + ;;; minor patch https://bugs.ruby-lang.org/projects/ruby-trunk/= repository/revisions/45225/diff/ + 'unpack 'patch-readline =20 + (lambda _ + (substitute* '(=20 + "ext/readline/readline.c" + ) + (("Function ") "rl_hook_func_t "))) + (alist-cons-before + 'configure 'replace-bin-sh + (lambda _ + (substitute* '( + "Makefile.in" + "ext/pty/pty.c" + "io.c" + "lib/mkmf.rb" + "process.c" + "test/rubygems/test_gem_ext_configure_builder.= rb" + "test/rdoc/test_rdoc_parser.rb" + "test/ruby/test_rubyoptions.rb" + "test/ruby/test_process.rb" + "test/ruby/test_system.rb" + "tool/rbinstall.rb" + ;;; "tool/config.guess" + ) + (("/bin/sh") (which "sh")))) + %standard-phases)))) + + (inputs + `(("readline" ,readline) + ("autoconf" ,autoconf) + ("openssl" ,openssl) + ("libffi" ,libffi) + ("gdbm" ,gdbm) + ("zlib" ,zlib) + )) + + (synopsis "Ruby") + (home-page "https://www.ruby-lang.org/en/") + (synopsis + "Ruby programming language") + (description + "Ruby description") + (license rl))) + diff --git a/guix/licenses.scm b/guix/licenses.scm index 23e4458..d9b71d7 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -255,6 +255,11 @@ which may be a file:// URI pointing the package's tr= ee." "http://directory.fsf.org/wiki/License:QPLv1.0" "http://www.gnu.org/licenses/license-list.html#QPL")) =20 +(define rl + (license "Ruby License" + "http://directory.fsf.org/wiki/License:Ruby" + "https://www.ruby-lang.org/en/about/license.txt")) + (define vim (license "Vim" "http://directory.fsf.org/wiki/License:Vim7.2" --Nq2Wo0NMKNjxTN9z--