>From c75cc9bd3af585907ef019d43236f12cc70cf832 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Thu, 2 Jun 2016 22:06:46 +1000 Subject: [PATCH] gnu: ruby-byebug: Update to 9.0.5. * gnu/packages/ruby.scm (ruby-byebug): Update to 9.0.5. [source]: Use 'GitHub' source. [arguments]: Enable tests. [native-inputs]: Add dependencies for tests. --- gnu/packages/ruby.scm | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 6eebd9a..68e42be 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2724,17 +2724,48 @@ with PostgreSQL 8.4 and later.") (define-public ruby-byebug (package (name "ruby-byebug") - (version "6.0.2") + (version "9.0.5") (source (origin (method url-fetch) - (uri (rubygems-uri "byebug" version)) + (uri (string-append + "https://github.com/deivid-rodriguez/byebug/archive/v" version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0537h9qbhr6csahmzyn4lk1g5b2lcligbzd21gfy93nx9lbfdnzc")))) + "0apgk5d2s68rzmzli09ryqigbk2nx7k5r01qw0iz51pp7m7hm34l")))) (build-system ruby-build-system) (arguments - '(#:tests? #f)) ; no tests + `(#:phases + (modify-phases %standard-phases + ;; Most of the dependencies are not needed for building and testing, + ;; so remove them. + (add-before 'build 'remove-dependencies + (lambda _ + (substitute* "Gemfile" + (("gem .*") "")) + (substitute* "Rakefile" + (("require 'chandler/tasks'") "")) + #t)) + ;; Tests require an installed gem, so run tests after install phase. + (delete 'check) + (add-after 'install 'check-after-install + (lambda* (#:key outputs #:allow-other-keys) + (setenv "GEM_PATH" + (string-append + (getenv "GEM_PATH") + ":" + (gem-home (assoc-ref outputs "out") + ,(package-version ruby)))) + (and (system* "rake" "compile") + (zero? (system* "rake" "test")))))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-yard" ,ruby-yard) + ("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-simplecov" ,ruby-simplecov) + ("ruby-pry" ,ruby-pry))) (synopsis "Debugger for Ruby 2") (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2 TracePoint C API for execution control and the Debug Inspector C API for call -- 2.7.4