gnu: libidn: Update to 1.30.
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
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 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages ruby)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages readline)
27 #:use-module (gnu packages openssl)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages libffi)
30 #:use-module (gnu packages gdbm)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix utils)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system ruby))
37
38 (define-public ruby
39 (package
40 (name "ruby")
41 (version "2.2.2")
42 (source
43 (origin
44 (method url-fetch)
45 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
46 (version-major+minor version)
47 "/ruby-" version ".tar.xz"))
48 (sha256
49 (base32
50 "0qj48a8ji8qj1sllsrhb6y65frwr77bvr08xikj86w5mib8baczh"))))
51 (build-system gnu-build-system)
52 (arguments
53 `(#:test-target "test"
54 #:parallel-tests? #f
55 #:phases
56 (alist-cons-before
57 'configure 'replace-bin-sh
58 (lambda _
59 (substitute* '("Makefile.in"
60 "ext/pty/pty.c"
61 "io.c"
62 "lib/mkmf.rb"
63 "process.c"
64 "test/rubygems/test_gem_ext_configure_builder.rb"
65 "test/rdoc/test_rdoc_parser.rb"
66 "test/ruby/test_rubyoptions.rb"
67 "test/ruby/test_process.rb"
68 "test/ruby/test_system.rb"
69 "tool/rbinstall.rb")
70 (("/bin/sh") (which "sh"))))
71 %standard-phases)))
72 (inputs
73 `(("readline" ,readline)
74 ("openssl" ,openssl)
75 ("libffi" ,libffi)
76 ("gdbm" ,gdbm)
77 ("zlib" ,zlib)))
78 (native-search-paths
79 (list (search-path-specification
80 (variable "GEM_PATH")
81 (files (list (string-append "lib/ruby/gems/"
82 (version-major+minor version)
83 ".0"))))))
84 (synopsis "Programming language interpreter")
85 (description "Ruby is a dynamic object-oriented programming language with
86 a focus on simplicity and productivity.")
87 (home-page "https://ruby-lang.org")
88 (license license:ruby)))
89
90 (define-public ruby-1.8
91 (package (inherit ruby)
92 (version "1.8.7-p374")
93 (source
94 (origin
95 (method url-fetch)
96 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
97 (version-major+minor version)
98 "/ruby-" version ".tar.bz2"))
99 (sha256
100 (base32
101 "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
102 (native-search-paths '())
103 (arguments
104 `(#:test-target "test"
105 #:parallel-tests? #f
106 #:phases
107 (alist-cons-before
108 'configure 'replace-bin-sh
109 (lambda _
110 (substitute* '("Makefile.in"
111 "ext/pty/pty.c"
112 "io.c"
113 "lib/mkmf.rb"
114 "process.c")
115 (("/bin/sh") (which "sh"))))
116 %standard-phases)))))
117
118 (define-public ruby-hoe
119 (package
120 (name "ruby-hoe")
121 (version "3.13.1")
122 (source (origin
123 (method git-fetch)
124 (uri (git-reference
125 (url "https://github.com/seattlerb/hoe.git")
126 (commit "0c11836"))) ; no release tags :(
127 (sha256
128 (base32
129 "0i8dimf8kxcjgqj9x65bbi3l6hc9p9gbfbb1vmrz42764a4jjbz9"))) )
130 (build-system ruby-build-system)
131 (arguments
132 '(#:phases (alist-replace
133 'build
134 (lambda _ (zero? (system* "rake" "gem")))
135 %standard-phases)))
136 (synopsis "Ruby project management helper")
137 (description
138 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
139 maintain, and release projects and includes a dynamic plug-in system allowing
140 for easy extensibility. Hoe ships with plug-ins for all the usual project
141 tasks including rdoc generation, testing, packaging, deployment, and
142 announcement.")
143 (home-page "http://www.zenspider.com/projects/hoe.html")
144 (license license:expat)))
145
146 (define-public ruby-i18n
147 (package
148 (name "ruby-i18n")
149 (version "0.6.11")
150 (source (origin
151 (method url-fetch)
152 (uri (string-append "https://github.com/svenfuchs/i18n/archive/v"
153 version ".tar.gz"))
154 (file-name (string-append name "-" version ".tar.gz"))
155 (sha256
156 (base32
157 "1fdhnhh1p5g8vibv44d770z8nq208zrms3m2nswdvr54072y1m6k"))))
158 (build-system ruby-build-system)
159 (arguments
160 '(#:tests? #f)) ; requires bundler
161 (synopsis "Internationalization library for Ruby")
162 (description "Ruby i18n is an internationalization and localization
163 solution for Ruby programs. It features translation and localization,
164 interpolation of values to translations, pluralization, customizable
165 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
166 translation data, custom key/scope separator, custom exception handlers, and
167 an extensible architecture with a swappable backend.")
168 (home-page "http://github.com/svenfuchs/i18n")
169 (license license:expat)))