me
/
guix
Archived
1
0
Fork 0

gnu: ruby-rugged: Update to 1.6.2-0.6379f23 and enable tests.

* gnu/packages/ruby.scm (ruby-rugged): Update to 1.6.2-0.6379f23.
[source]: Fetch via git.
[arguments]: Enable tests.  Add #:phases.
[native-inputs]: Add git-minimal/pinned.  Remove ruby-minitest and ruby-pry.
master
Maxim Cournoyer 2023-03-20 11:06:52 -04:00
parent 008a2f1803
commit 45fd01ac5d
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 78 additions and 21 deletions

View File

@ -12095,29 +12095,86 @@ defined in @file{.travis.yml} on your local machine, using @code{rvm},
(license license:expat))) (license license:expat)))
(define-public ruby-rugged (define-public ruby-rugged
(package ;; The last release is old and doesn't build anymore (see:
(name "ruby-rugged") ;; https://github.com/libgit2/rugged/issues/951).
(version "1.1.0") (let ((commit "6379f23cedd5f527cf6a5c229627e366b590a22d")
(home-page "https://www.rubydoc.info/gems/rugged") (revision "0"))
(source (package
(origin (name "ruby-rugged")
(method url-fetch) (version (git-version "1.6.2" revision commit))
(uri (rubygems-uri "rugged" version)) (source (origin
(sha256 (method git-fetch)
(base32 "04aq913plcxjw71l5r62qgz3bx3466p0wvgyfqahg5n3nybmcwqy")))) (uri (git-reference
(build-system ruby-build-system) (url "https://github.com/libgit2/rugged")
(arguments (commit commit)))
`(#:tests? #f (file-name (git-file-name name version))
#:gem-flags (list "--" "--use-system-libraries"))) (sha256
(inputs (base32
(list libgit2)) "0yac7vm0l2jsdsxf2k7xbny4iyzsy8fhiy2g5sphhffp7xgynny8"))))
(native-inputs (build-system ruby-build-system)
(list ruby-minitest ruby-pry ruby-rake-compiler)) (arguments
(synopsis "Ruby bindings to the libgit2 linkable C Git library") (list #:gem-flags
(description "Rugged is a library for accessing libgit2 in Ruby. It gives #~(list "--" "--use-system-libraries")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'adjust-extconf.rb
(lambda _
;; Neither using --with-git2-dir=$prefix nor providing
;; pkg-config allows locating the libgit2 prefix (see:
;; https://github.com/libgit2/rugged/issues/955).
(substitute* "ext/rugged/extconf.rb"
(("LIBGIT2_DIR = File.join.*'vendor', 'libgit2'.*")
(format #f "LIBGIT2_DIR = ~s~%"
#$(this-package-input "libgit2"))))))
(delete 'check) ;moved after the install phase
(add-after 'install 'check
(assoc-ref %standard-phases 'check))
(add-before 'check 'set-GEM_PATH
(lambda _
(setenv "GEM_PATH" (string-append
(getenv "GEM_PATH") ":"
#$output "/lib/ruby/vendor_ruby"))))
(add-before 'check 'disable-problematic-tests
(lambda _
(with-directory-excursion "test"
(for-each delete-file
;; These tests require an actual libgit2 git
;; repository checkout.
'("blame_test.rb"
"blob_test.rb"
"cherrypick_test.rb"
"config_test.rb"
"commit_test.rb"
"diff_test.rb"
"index_test.rb"
"merge_test.rb"
"note_test.rb"
"object_test.rb"
"patch_test.rb"
"rebase_test.rb"
"reference_test.rb"
"remote_test.rb"
"repo_apply_test.rb"
"repo_ignore_test.rb"
"repo_pack_test.rb"
"repo_reset_test.rb"
"repo_test.rb"
"revert_test.rb"
"settings_test.rb"
"status_test.rb"
"submodule_test.rb"
"tag_test.rb"
"tree_test.rb"
"walker_test.rb"))
(delete-file-recursively "online")))))))
(native-inputs (list git-minimal/pinned ruby-rake-compiler))
(inputs (list libgit2))
(synopsis "Ruby bindings to the libgit2 linkable C Git library")
(description "Rugged is a library for accessing libgit2 in Ruby. It gives
you the speed and portability of libgit2 with the beauty of the Ruby you the speed and portability of libgit2 with the beauty of the Ruby
language.") language.")
(license license:expat))) (home-page "https://www.rubydoc.info/gems/rugged")
(license license:expat))))
(define-public ruby-yell (define-public ruby-yell
(package (package