summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-10-27 02:34:26 -0400
committerMark H Weaver <mhw@netris.org>2014-10-27 03:20:36 -0400
commit6becfdff766c00469faa3455e7ab7eb9f64730ac (patch)
tree0c1ea069cdc909165d8b25ce839adc42df8c1784
parent218ee89b0cf11483e7b3bf57e0bef340f5531206 (diff)
downloadpatches-6becfdff766c00469faa3455e7ab7eb9f64730ac.tar
patches-6becfdff766c00469faa3455e7ab7eb9f64730ac.tar.gz
gnu: ruby: Miscellaneous improvements to package definition.
* gnu/packages/ruby.scm (ruby): Compute major+minor version string for the source URI. Switch to the .bz2 tarball and update the hash accordingly. Remove 'autoconf' from the inputs. Change 'native-search-paths' to the directory that is actually created by the build. Remove the package name from the synopsis. (ruby-1.8): Compute major+minor version string for the source URI, and avoid the use of 'name' in the URI computation. Remove 'name' field, since it is inherited and no longer needed.
-rw-r--r--gnu/packages/ruby.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 5814089ff8..a33dabaebd 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,6 +1,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,11 +40,12 @@
(source
(origin
(method url-fetch)
- (uri (string-append "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-"
- version ".tar.gz"))
+ (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+ (version-major+minor version)
+ "/ruby-" version ".tar.bz2"))
(sha256
(base32
- "00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608"))))
+ "1mkndw0by11n6lyvq7dzly702yyqg5x0fcvfqrn9y4p49bw75kin"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -74,7 +76,6 @@
%standard-phases))))
(inputs
`(("readline" ,readline)
- ("autoconf" ,autoconf)
("openssl" ,openssl)
("libffi" ,libffi)
("gdbm" ,gdbm)
@@ -82,8 +83,11 @@
(native-search-paths
(list (search-path-specification
(variable "GEM_PATH")
- (directories '("lib/ruby/gems/2.1.3")))))
- (synopsis "Ruby programming language interpreter")
+ (directories
+ (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")
@@ -91,13 +95,13 @@ a focus on simplicity and productivity.")
(define-public ruby-1.8
(package (inherit ruby)
- (name "ruby")
(version "1.8.7-p374")
(source
(origin
(method url-fetch)
- (uri (string-append "http://cache.ruby-lang.org/pub/ruby/1.8/"
- name "-" version ".tar.bz2"))
+ (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+ (version-major+minor version)
+ "/ruby-" version ".tar.bz2"))
(sha256
(base32
"1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))