summaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-01-28 16:13:55 +0000
committerChristopher Baines <mail@cbaines.net>2019-02-14 21:38:02 +0000
commita058cbfd570a1a41bae0a50c2bf1d414512bd9e4 (patch)
tree87ecffac158a0c1c87743413fca04103d8c23941 /gnu/packages/ruby.scm
parenta229acffb7a68da87a8a4bb1cfc53328ce3187a2 (diff)
downloadpatches-a058cbfd570a1a41bae0a50c2bf1d414512bd9e4.tar
patches-a058cbfd570a1a41bae0a50c2bf1d414512bd9e4.tar.gz
gnu: Add ruby-nio4r.
Required for ruby-actioncable. * gnu/packages/ruby.scm (ruby-nio4r): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e9c0187639..1071460efc 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7484,3 +7484,52 @@ logic in Jekyll. It calculates and generates the pagination pages.")
interface over different adapters.")
(home-page "https://github.com/lostisland/faraday")
(license license:expat)))
+
+(define-public ruby-nio4r
+ (package
+ (name "ruby-nio4r")
+ (version "2.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "nio4r" version))
+ (sha256
+ (base32
+ "1a41ca1kpdmrypjp9xbgvckpy8g26zxphkja9vk7j5wl4n8yvlyr"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-unnecessary-dependencies
+ (lambda _
+ (substitute* "spec/spec_helper.rb"
+ ;; Coveralls is for uploading test coverage information to an
+ ;; online service, and thus unnecessary for building the Guix
+ ;; package
+ (("require \"coveralls\"") "")
+ (("Coveralls\\.wear!") "")
+ ;; Remove rspec/retry as we are not retrying the tests
+ (("require \"rspec/retry\"") "")
+ (("config\\.display_try_failure_messages = true") "")
+ (("config\\.verbose_retry = true") ""))
+ #t))
+ (add-before 'check 'compile
+ (lambda _
+ (invoke "rake" "compile")
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec"))
+ #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-rubocop" ,ruby-rubocop)))
+ (synopsis "New I/O for Ruby")
+ (description
+ "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
+for scalable network clients and servers.")
+ (home-page "https://github.com/socketry/nio4r")
+ (license license:expat)))