gnu: ruby-minitest-tu-shim: Fix build.

* gnu/packages/ruby.scm (ruby-minitest-tu-shim)[arguments]: Update style.
[propagated-inputs]: Update style.
[native-inputs]: Use ruby-hoe-3.
This commit is contained in:
Christopher Baines 2023-07-03 10:05:39 +01:00
parent f8827a4416
commit 411791ea40
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -7491,34 +7491,33 @@ (define-public ruby-minitest-tu-shim
"0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn")))) "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'fix-test-include-path #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'fix-test-include-path
(let* ((minitest (assoc-ref inputs "ruby-minitest-4"))) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "Rakefile" (let* ((minitest (assoc-ref inputs "ruby-minitest")))
(("Hoe\\.add_include_dirs .*") (substitute* "Rakefile"
(string-append "Hoe.add_include_dirs \"" (("Hoe\\.add_include_dirs .*")
minitest "/lib/ruby/vendor_ruby" (string-append "Hoe.add_include_dirs \""
"/gems/minitest-" minitest "/lib/ruby/vendor_ruby"
,(package-version ruby-minitest-4) "/gems/minitest-"
"/lib" "\"")))) #$(package-version ruby-minitest-4)
#t)) "/lib" "\""))))))
(add-before 'check 'fix-test-assumptions (add-before 'check 'fix-test-assumptions
(lambda _ (lambda _
;; The test output includes the file name, so a couple of tests ;; The test output includes the file name, so a couple of tests
;; fail. Changing the regular expressions slightly fixes this ;; fail. Changing the regular expressions slightly fixes this
;; problem. ;; problem.
(substitute* "test/test_mini_test.rb" (substitute* "test/test_mini_test.rb"
(("output.sub!\\(.*, 'FILE:LINE'\\)") (("output.sub!\\(.*, 'FILE:LINE'\\)")
"output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')") "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
(("gsub\\(/.*, 'FILE:LINE'\\)") (("gsub\\(/.*, 'FILE:LINE'\\)")
"gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")) "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")))))))
#t)))))
(propagated-inputs (propagated-inputs
`(("ruby-minitest-4" ,ruby-minitest-4))) (list ruby-minitest-4))
(native-inputs (native-inputs
(list ruby-hoe)) (list ruby-hoe-3))
(synopsis "Adapter library between minitest and test/unit") (synopsis "Adapter library between minitest and test/unit")
(description (description
"This library bridges the gap between the small and fast minitest and "This library bridges the gap between the small and fast minitest and