guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/23: gnu: Add ruby-hamster.


From: guix-commits
Subject: 02/23: gnu: Add ruby-hamster.
Date: Mon, 4 Mar 2019 15:33:32 -0500 (EST)

cbaines pushed a commit to branch master
in repository guix.

commit 353b7eb8c5e35beb94b4ad7208a0d72704e7c9fb
Author: Christopher Baines <address@hidden>
Date:   Sun Feb 17 17:10:12 2019 +0000

    gnu: Add ruby-hamster.
    
    * gnu/packages/ruby.scm (ruby-hamster): New variable.
---
 gnu/packages/ruby.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 89ee521..521ad35 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},
address@hidden, @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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]