gnu: ruby-stackprof: Update to 0.2.27-0.5d83283.

* gnu/packages/ruby-xyz.scm (ruby-stackprof): Update to 0.2.27-0.5d83283.
This commit is contained in:
Nicolas Graves 2025-06-18 16:27:07 +02:00 committed by Andreas Enge
parent e8a9a07376
commit 8d005cdc82
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -9027,53 +9027,56 @@ navigation capabilities to @code{pry}, using @code{byebug}.")
(license license:expat))) (license license:expat)))
(define-public ruby-stackprof (define-public ruby-stackprof
(package (let ((commit "5d832832e4afcb88521292d6dfad4a9af760ef7c")
(name "ruby-stackprof") (revision "0"))
(version "0.2.27") (package
(source (name "ruby-stackprof")
(origin (version (git-version "0.2.27" revision commit))
(method url-fetch) (source
(uri (rubygems-uri "stackprof" version)) (origin
(sha256 (method git-fetch)
(base32 "03788mbipmihq2w7rznzvv0ks0s9z1321k1jyr6ffln8as3d5xmg")))) (uri (git-reference
(build-system ruby-build-system) (url "https://github.com/tmm1/stackprof")
(arguments (commit commit)))
(list (file-name (git-file-name name version))
#:phases (sha256
#~(modify-phases %standard-phases (base32 "184n5lpsclrw5ypcskk3gxbg28acxr5jkjaxlxc3nl4jzsjrammw"))))
(add-before 'check 'patch-gemspec (build-system ruby-build-system)
(lambda _ (arguments
(substitute* "stackprof.gemspec" (list
(("rake-compiler.*") #:phases
"rake-compiler>.freeze, [\"> 0.9\"])\n") #~(modify-phases %standard-phases
(("mocha.*") (add-before 'check 'patch-gemspec
"mocha>.freeze, [\"> 0.14\"])\n")))) (lambda _
(add-before 'check 'skip-dubious-test (substitute* "stackprof.gemspec"
(lambda _ (("rake-compiler.*")
(substitute* "test/test_stackprof.rb" "rake-compiler', [\"> 0.9\"]\n"))))
;; This unreliable test can fail with "Expected 0 to be >= 1." (add-before 'check 'skip-dubious-test
(("def test_(cputime)" _ name) (lambda _
(string-append "def skip_" name)) (substitute* "test/test_stackprof.rb"
;; This test often fails ;; This unreliable test can fail with "Expected 0 to be >= 1."
(("def test_gc") "def skip_test_gc") (("def test_(cputime)" _ name)
;; This test is known to fail on 32-bit systems. (string-append "def skip_" name))
;; /gnu/store/...-stackprof-0.2.27.gem ;; This test often fails
(("def test_raw") "def skip_test_raw")))) (("def test_gc") "def skip_test_gc")
(add-before 'check 'build-tests ;; This test is known to fail on 32-bit systems.
(lambda _ ;; /gnu/store/...-stackprof-0.2.27.gem
(invoke "rake" "compile"))) (("def test_raw") "def skip_test_raw"))))
(replace 'check (add-before 'check 'build-tests
(lambda* (#:key tests? #:allow-other-keys) (lambda _
(when tests? (invoke "rake" "compile")))
(invoke "bundle" "exec" "rake" "default"))))))) (replace 'check
(native-inputs (lambda* (#:key tests? #:allow-other-keys)
(list bundler ruby-mocha-1 ruby-rake-compiler)) (when tests?
(synopsis "Sampling profiler for Ruby code") (invoke "bundle" "exec" "rake" "default")))))))
(description (native-inputs
"@code{stackprof} is a fast sampling profiler for Ruby code, with cpu, (list bundler ruby-minitest ruby-rake-compiler))
(synopsis "Sampling profiler for Ruby code")
(description
"@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
wallclock and object allocation samplers.") wallclock and object allocation samplers.")
(home-page "https://github.com/tmm1/stackprof") (home-page "https://github.com/tmm1/stackprof")
(license license:expat))) (license license:expat))))
(define-public ruby-bindex (define-public ruby-bindex
(package (package