gnu: ruby-byebug: Fix build.

* gnu/packages/ruby.scm (ruby-byebug)[arguments]: Update style and skip some
failing tests.
[native-inputs]: Use ruby-minitest rather than ruby-minitest-5.15.
This commit is contained in:
Christopher Baines 2023-06-30 09:55:08 +01:00
parent 52cbeffa59
commit 701608c496
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -8101,8 +8101,9 @@ (define-public ruby-byebug
(("require \"bundler/setup\".*") ""))))))) (("require \"bundler/setup\".*") "")))))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'sanitize-dependencies (add-after 'unpack 'sanitize-dependencies
(lambda _ (lambda _
(substitute* "Rakefile" (substitute* "Rakefile"
@ -8115,9 +8116,11 @@ (define-public ruby-byebug
(add-before 'build 'compile (add-before 'build 'compile
(lambda _ (lambda _
(invoke "rake" "compile"))) (invoke "rake" "compile")))
(add-before 'check 'disable-misbehaving-test (add-before 'check 'patch-tests
;; Expects 5, gets 162. From a file containing ~10 lines.
(lambda _ (lambda _
;; srand': no implicit conversion of nil into Integer (TypeError)
(delete-file "test/minitest_runner_test.rb")
;; Expects 5, gets 162. From a file containing ~10 lines.
(substitute* "test/commands/finish_test.rb" (substitute* "test/commands/finish_test.rb"
(("test_finish_inside_autoloaded_files") (("test_finish_inside_autoloaded_files")
"finish_inside_autoloaded_files")))) "finish_inside_autoloaded_files"))))
@ -8126,11 +8129,7 @@ (define-public ruby-byebug
(setenv "HOME" (getcwd))))))) (setenv "HOME" (getcwd)))))))
(native-inputs (native-inputs
(list bundler (list bundler
;; Using minitest 5.17 would cause 5 new bug failures. This is ruby-minitest
;; probably related to
;; https://github.com/deivid-rodriguez/byebug/pull/837. Use
;; minitest 5.15 until this is resolved and released.
ruby-minitest-5.15
ruby-pry ruby-pry
ruby-rake-compiler ruby-rake-compiler
ruby-rubocop ruby-rubocop