gnu: Add ruby-concurrent.

* gnu/packages/ruby.scm (ruby-concurrent): New variable.
* gnu/packages/patches/ruby-concurrent-ignore-broken-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
Ben Woodcroft 2016-06-03 15:55:36 +10:00
parent 3cc7809745
commit dae620b8fe
No known key found for this signature in database
GPG Key ID: E44DCCD146E0CCF4
3 changed files with 74 additions and 0 deletions

View File

@ -732,6 +732,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpm-CVE-2014-8118.patch \ %D%/packages/patches/rpm-CVE-2014-8118.patch \
%D%/packages/patches/rsem-makefile.patch \ %D%/packages/patches/rsem-makefile.patch \
%D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \
%D%/packages/patches/ruby-symlinkfix.patch \ %D%/packages/patches/ruby-symlinkfix.patch \
%D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
%D%/packages/patches/rush-CVE-2013-6889.patch \ %D%/packages/patches/rush-CVE-2013-6889.patch \

View File

@ -0,0 +1,16 @@
This test appears to fail in GNU Guix and elsewhere. It has been reported
upstream at https://github.com/puma/puma/issues/995
diff --git a/spec/concurrent/channel_spec.rb b/spec/concurrent/channel_spec.rb
index d70fba8..4f29a8b 100644
--- a/spec/concurrent/channel_spec.rb
+++ b/spec/concurrent/channel_spec.rb
@@ -598,7 +598,7 @@ module Concurrent
}.to raise_error(ArgumentError)
end
- it 'loops until the block returns false' do
+ xit 'loops until the block returns false' do
actual = 0
expected = 3
latch = Concurrent::CountDownLatch.new(expected)

View File

@ -3995,4 +3995,61 @@ call.")
(home-page "https://github.com/travisjeffery/timecop") (home-page "https://github.com/travisjeffery/timecop")
(license license:expat))) (license license:expat)))
(define-public ruby-concurrent
(package
(name "ruby-concurrent")
(version "1.0.2")
(source
(origin
(method url-fetch)
;; Download from GitHub because the rubygems version does not contain
;; Rakefile.
(uri (string-append
"https://github.com/ruby-concurrency/concurrent-ruby/archive/v"
version
".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1x3g2admp14ykwfxidsicqbhlfsnxh9wyc806np4i15hws4if1d8"))
;; Exclude failing test reported at
;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534
(patches (search-patches "ruby-concurrent-ignore-broken-test.patch"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-before 'build 'remove-git-lsfiles-and-extra-gemspecs
(lambda _
(for-each (lambda (file)
(substitute* file
(("git ls-files") "find * |sort")))
(list "concurrent-ruby.gemspec"
"support/file_map.rb"))
#t))
(add-before 'build 'remove-extra-gemspecs
(lambda _
;; Delete extra gemspec files so 'first-gemspec' chooses the
;; correct one.
(delete-file "concurrent-ruby-edge.gemspec")
(delete-file "concurrent-ruby-ext.gemspec")
#t))
(add-before 'check 'rake-compile
;; Fix the test error described at
;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408
(lambda _ (zero? (system* "rake" "compile")))))))
(native-inputs
`(("ruby-rake-compiler" ,ruby-rake-compiler)
("ruby-yard" ,ruby-yard)
("ruby-rspec" ,ruby-rspec)
("ruby-timecop" ,ruby-timecop)))
(synopsis "Concurrency tools for Ruby")
(description
"This library provides modern concurrency tools including agents,
futures, promises, thread pools, actors, supervisors, and more. It is
inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
patterns.")
(home-page "http://www.concurrent-ruby.com")
(license license:expat)))