aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-02-17 17:10:12 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-04 20:33:19 +0000
commit353b7eb8c5e35beb94b4ad7208a0d72704e7c9fb (patch)
tree2fcf85dcb1c5f323699de6f9efa2958ceec58265 /gnu/packages
parent433e3154302246b3009b44e7d8da266919ef0af8 (diff)
downloadpatches-353b7eb8c5e35beb94b4ad7208a0d72704e7c9fb.tar
patches-353b7eb8c5e35beb94b4ad7208a0d72704e7c9fb.tar.gz
gnu: Add ruby-hamster.
* gnu/packages/ruby.scm (ruby-hamster): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ruby.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 89ee5211be..521ad35936 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1562,6 +1562,52 @@ failure.")
(home-page "https://github.com/thekompanee/fuubar")
(license license:expat)))
+(define-public ruby-hamster
+ (package
+ (name "ruby-hamster")
+ (version "3.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "hamster" version))
+ (sha256
+ (base32
+ "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-unnecessary-dependencies
+ (lambda _
+ ;; pry is a debugging tool, and is unnecessary when running the
+ ;; tests
+ (substitute* "spec/lib/hamster/vector/insert_spec.rb"
+ (("require 'pry'") ""))
+ (substitute* "spec/spec_helper.rb"
+ (("require \"pry\"") "")
+ ;; CodeClimate is an online service, and is unnecessary for
+ ;; running the tests
+ (("require \"codeclimate-test-reporter\"") "")
+ (("CodeClimate.*\n") ""))
+ #t))
+ ;; No Rakefile is included, so run rspec directly.
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec"))
+ #t)))))
+ (propagated-inputs
+ `(("ruby-concurrent" ,ruby-concurrent)))
+ (native-inputs
+ `(("ruby-rspec" ,ruby-rspec)))
+ (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
+ (description
+ "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
+@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
+immutable queue or stack).")
+ (home-page "https://github.com/hamstergem/hamster")
+ (license license:expat)))
+
(define-public ruby-hashdiff
(package
(name "ruby-hashdiff")