From 6becfdff766c00469faa3455e7ab7eb9f64730ac Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 27 Oct 2014 02:34:26 -0400 Subject: 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. --- gnu/packages/ruby.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'gnu') 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 ;;; Copyright © 2014 Ludovic Courtès +;;; Copyright © 2014 Mark H Weaver ;;; ;;; 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")))) -- cgit v1.2.3