Commit | Line | Data |
---|---|---|
6ef8c59a PP |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl> | |
3 | ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> | |
4 | ;;; | |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages ruby) | |
21 | #:use-module ((guix licenses) #:prefix license:) | |
22 | #:use-module (gnu packages) | |
23 | #:use-module (gnu packages compression) | |
24 | #:use-module (gnu packages readline) | |
25 | #:use-module (gnu packages openssl) | |
26 | #:use-module (gnu packages autotools) | |
27 | #:use-module (gnu packages libffi) | |
28 | #:use-module (gnu packages gdbm) | |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix download) | |
31 | #:use-module (guix utils) | |
32 | #:use-module (guix build-system gnu)) | |
33 | ||
34 | (define-public ruby | |
35 | (package | |
36 | (name "ruby") | |
37 | (version "2.1.3") | |
38 | (source | |
39 | (origin | |
40 | (method url-fetch) | |
41 | (uri (string-append "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-" | |
42 | version ".tar.gz")) | |
43 | (sha256 | |
44 | (base32 | |
45 | "00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608")))) | |
46 | (build-system gnu-build-system) | |
47 | (arguments | |
48 | `(#:test-target "test" | |
49 | #:parallel-tests? #f | |
50 | #:phases | |
51 | (alist-cons-after | |
52 | ;; Minor patch: | |
53 | ;; https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45225/diff/ | |
54 | 'unpack 'patch-readline | |
55 | (lambda _ | |
56 | (substitute* '("ext/readline/readline.c") | |
57 | (("Function ") "rl_hook_func_t "))) | |
58 | (alist-cons-before | |
59 | 'configure 'replace-bin-sh | |
60 | (lambda _ | |
61 | (substitute* '("Makefile.in" | |
62 | "ext/pty/pty.c" | |
63 | "io.c" | |
64 | "lib/mkmf.rb" | |
65 | "process.c" | |
66 | "test/rubygems/test_gem_ext_configure_builder.rb" | |
67 | "test/rdoc/test_rdoc_parser.rb" | |
68 | "test/ruby/test_rubyoptions.rb" | |
69 | "test/ruby/test_process.rb" | |
70 | "test/ruby/test_system.rb" | |
71 | "tool/rbinstall.rb") | |
72 | (("/bin/sh") (which "sh")))) | |
73 | %standard-phases)))) | |
74 | (inputs | |
75 | `(("readline" ,readline) | |
76 | ("autoconf" ,autoconf) | |
77 | ("openssl" ,openssl) | |
78 | ("libffi" ,libffi) | |
79 | ("gdbm" ,gdbm) | |
80 | ("zlib" ,zlib))) | |
81 | (native-search-paths | |
82 | (list (search-path-specification | |
83 | (variable "GEM_PATH") | |
84 | (directories '("lib/ruby/gems/2.1.3"))))) | |
85 | (synopsis "Ruby programming language interpreter") | |
86 | (description "Ruby is a dynamic object-oriented programming language with | |
87 | a focus on simplicity and productivity.") | |
88 | (home-page "https://ruby-lang.org") | |
89 | (license license:ruby))) | |
90 |