On 06/02/2016 08:19 PM, Ben Woodcroft wrote:

On 06/01/2016 01:38 AM, Matthew Jordan wrote:
+(define-public ruby-byebug-9

It seems I was off-base a bit here. There was already a ruby-byebug packaged, but it was somewhat out of date. Shall we simply update the existing package instead of creating a new package?

I had a go at re-enabling tests which were disabled in the original package - see the attached patch. Unfortunately it is still failing a few tests. Would you like to take a look into why this might be?

Thanks,
ben
>From c75cc9bd3af585907ef019d43236f12cc70cf832 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
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

Reply via email to