From e218b0c8b39b5f1560ac0401181d4209ffe93119 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Wed, 30 Dec 2015 16:51:18 +1000 Subject: [PATCH] gnu: Add ruby-ruby-engine. * gnu/packages/ruby.scm (ruby-ruby-engine): New variable. --- gnu/packages/ruby.scm | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 703ca37aa0..dcf4cda26a 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3716,6 +3716,55 @@ used to create both network servers and clients.") (home-page "http://rubyeventmachine.com") (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT +(define-public ruby-ruby-engine + (package + (name "ruby-ruby-engine") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "ruby_engine" version)) + (sha256 + (base32 + "1d0sd4q50zkcqhr395wj1wpn2ql52r0fpwhzjfvi1bljml7k546v")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'clean-up + (lambda _ + (delete-file "Gemfile.lock") + (substitute* "ruby_engine.gemspec" + ;; Remove unnecessary imports that would entail further + ;; dependencies. + ((".*.freeze, \\[\\\"~> 10.0\\\"\\]") + "%q.freeze, [\">= 10.0\"]") + ;; Soften the rspec dependency + (("%q.freeze, \\[\\\"~> 2.4\\\"\\]") + "%q.freeze, [\">= 2.4\"]")) + (substitute* "Rakefile" + (("require 'rubygems/tasks'") "") + (("Gem::Tasks.new") "")) + ;; Remove extraneous .gem file that otherwise gets installed. + (delete-file "pkg/ruby_engine-1.0.0.gem") + #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-rake" ,ruby-rake) + ("ruby-rspec" ,ruby-rspec))) + (synopsis "Simplifies checking for Ruby implementation") + (description + "@code{ruby_engine} provides an RubyEngine class that can be used to +check which implementation of Ruby is in use. It can provide the interpreter +name and provides query methods such as @{RubyEngine.mri?}.") + (home-page "https://github.com/janlelis/ruby_engine") + (license license:expat))) + (define-public ruby-turn (package (name "ruby-turn")