2014-09-27 08:56:44 -04:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl>
|
|
|
|
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
2014-10-27 02:34:26 -04:00
|
|
|
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
2014-09-27 08:56:44 -04:00
|
|
|
;;;
|
|
|
|
;;; 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 utils)
|
2014-09-28 11:16:09 -04:00
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (guix build-system ruby))
|
2014-09-27 08:56:44 -04:00
|
|
|
|
|
|
|
(define-public ruby
|
|
|
|
(package
|
|
|
|
(name "ruby")
|
|
|
|
(version "2.1.3")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
2014-10-27 02:34:26 -04:00
|
|
|
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
|
|
|
|
(version-major+minor version)
|
|
|
|
"/ruby-" version ".tar.bz2"))
|
2014-09-27 08:56:44 -04:00
|
|
|
(sha256
|
|
|
|
(base32
|
2014-10-27 02:34:26 -04:00
|
|
|
"1mkndw0by11n6lyvq7dzly702yyqg5x0fcvfqrn9y4p49bw75kin"))))
|
2014-09-27 08:56:44 -04:00
|
|
|
(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
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("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")
|
|
|
|
(("/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")
|
2014-10-27 02:34:26 -04:00
|
|
|
(directories
|
|
|
|
(list (string-append "lib/ruby/gems/"
|
|
|
|
(version-major+minor version)
|
|
|
|
".0"))))))
|
|
|
|
(synopsis "Programming language interpreter")
|
2014-09-27 08:56:44 -04:00
|
|
|
(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)))
|
|
|
|
|
2014-10-27 01:30:09 -04:00
|
|
|
(define-public ruby-1.8
|
|
|
|
(package (inherit ruby)
|
|
|
|
(version "1.8.7-p374")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
2014-10-27 02:34:26 -04:00
|
|
|
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
|
|
|
|
(version-major+minor version)
|
|
|
|
"/ruby-" version ".tar.bz2"))
|
2014-10-27 01:30:09 -04:00
|
|
|
(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)))))
|
|
|
|
|
2014-09-28 11:16:09 -04:00
|
|
|
(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)))
|