1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
| | ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;;
;;; 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 (at
;;; 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 <http://www.gnu.org/licenses/>.
(define-module (gnu packages ruby)
#:use-module ((guix licenses) #:prefix license:)
#: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 git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system ruby))
(define-public ruby
(package
(name "ruby")
(version "2.2.0")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.xz"))
(sha256
(base32
"1jpq7r48pmkll5lfw933013ijv750sr61c63p96v8pzwh3i191w4"))))
(build-system gnu-build-system)
(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"
"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")
(("/bin/sh") (which "sh"))))
%standard-phases)))
(inputs
`(("readline" ,readline)
("openssl" ,openssl)
("libffi" ,libffi)
("gdbm" ,gdbm)
("zlib" ,zlib)))
(native-search-paths
(list (search-path-specification
(variable "GEM_PATH")
(files (list (string-append "lib/ruby/gems/"
(version-major+minor version)
".0"))))))
(synopsis "Programming language interpreter")
(description "Ruby is a dynamic object-oriented programming language with
a focus on simplicity and productivity.")
(home-page "https://ruby-lang.org")
(license license:ruby)))
(define-public ruby-1.8
(package (inherit ruby)
(version "1.8.7-p374")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.bz2"))
(sha256
(base32
"1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
(native-search-paths '())
(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)))))
(define-public ruby-hoe
(package
(name "ruby-hoe")
(version "3.13.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/seattlerb/hoe.git")
(commit "0c11836"))) ; no release tags :(
(sha256
(base32
"0i8dimf8kxcjgqj9x65bbi3l6hc9p9gbfbb1vmrz42764a4jjbz9"))) )
(build-system ruby-build-system)
(arguments
'(#:phases (alist-replace
'build
(lambda _ (zero? (system* "rake" "gem")))
%standard-phases)))
(synopsis "Ruby project management helper")
(description
"Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
maintain, and release projects and includes a dynamic plug-in system allowing
for easy extensibility. Hoe ships with plug-ins for all the usual project
tasks including rdoc generation, testing, packaging, deployment, and
announcement.")
(home-page "http://www.zenspider.com/projects/hoe.html")
(license license:expat)))
(define-public ruby-i18n
(package
(name "ruby-i18n")
(version "0.6.11")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/svenfuchs/i18n/archive/v"
version ".tar.gz"))
(sha256
(base32
"1fdhnhh1p5g8vibv44d770z8nq208zrms3m2nswdvr54072y1m6k"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; requires bundler
(synopsis "Internationalization library for Ruby")
(description "Ruby i18n is an internationalization and localization
solution for Ruby programs. It features translation and localization,
interpolation of values to translations, pluralization, customizable
transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
translation data, custom key/scope separator, custom exception handlers, and
an extensible architecture with a swappable backend.")
(home-page "http://github.com/svenfuchs/i18n")
(license license:expat)))
|