aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:45:10 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 11:54:02 +0100
commitadde419cd642069594b38adad3adc2c1cd94b03c (patch)
tree195061ba2c1d65ee739d768713b9a37e7863dae9
parent6ffe8c44bc0a7eca9830238bc16141b44c4cea8c (diff)
downloadguix-adde419cd642069594b38adad3adc2c1cd94b03c.tar
guix-adde419cd642069594b38adad3adc2c1cd94b03c.tar.gz
gnu: Add ruby_version.
-rw-r--r--gnu/packages/ruby.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 59a293333d..7bbf64f284 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5890,3 +5890,44 @@ will probably be an issue and hence this gem.")
(home-page
"https://github.com/pboling/rspec-pending_for")
(license #f)))
+
+(define-public ruby_version ; There is another gem called 'ruby-version' so we
+ ; use an underscore in this name
+ (package
+ (name "ruby_version")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "ruby_version" version))
+ (sha256
+ (base32
+ "0854i1bjy56176anr05l5m0vc81nl53c7fyfg7sljj62m1d64dgj"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-dependencies
+ (lambda _
+ (delete-file "Gemfile.lock")
+ (delete-file "pkg/ruby_version-1.0.0.gem")
+ (substitute* "ruby_version.gemspec"
+ ((".*rdoc.*") "\n")
+ (("rake.*") "rake>)\n")
+ ((".*rubygems-tasks.*") "\n"))
+ (substitute* "Rakefile"
+ (("^require 'rubygems/tasks'") "")
+ (("Gem::Tasks.new") ""))
+ #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rspec" ,ruby-rspec-2)
+ ("ruby-rake" ,ruby-rake)))
+ (synopsis
+ "Provides a RubyVersion class to simplify checking for the right Ruby version in your programs.")
+ (description
+ "Provides a RubyVersion class to simplify checking for the right Ruby version in your programs.")
+ (home-page
+ "https://github.com/janlelis/ruby_version")
+ (license license:expat)))