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.
This commit is contained in:
Mark H Weaver 2014-10-27 02:34:26 -04:00
parent 218ee89b0c
commit 6becfdff76
1 changed files with 13 additions and 9 deletions

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl> ;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -39,11 +40,12 @@
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-" (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
version ".tar.gz")) (version-major+minor version)
"/ruby-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608")))) "1mkndw0by11n6lyvq7dzly702yyqg5x0fcvfqrn9y4p49bw75kin"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
@ -74,7 +76,6 @@
%standard-phases)))) %standard-phases))))
(inputs (inputs
`(("readline" ,readline) `(("readline" ,readline)
("autoconf" ,autoconf)
("openssl" ,openssl) ("openssl" ,openssl)
("libffi" ,libffi) ("libffi" ,libffi)
("gdbm" ,gdbm) ("gdbm" ,gdbm)
@ -82,8 +83,11 @@
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "GEM_PATH") (variable "GEM_PATH")
(directories '("lib/ruby/gems/2.1.3"))))) (directories
(synopsis "Ruby programming language interpreter") (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 (description "Ruby is a dynamic object-oriented programming language with
a focus on simplicity and productivity.") a focus on simplicity and productivity.")
(home-page "https://ruby-lang.org") (home-page "https://ruby-lang.org")
@ -91,13 +95,13 @@ a focus on simplicity and productivity.")
(define-public ruby-1.8 (define-public ruby-1.8
(package (inherit ruby) (package (inherit ruby)
(name "ruby")
(version "1.8.7-p374") (version "1.8.7-p374")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/1.8/" (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
name "-" version ".tar.bz2")) (version-major+minor version)
"/ruby-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl")))) "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))