aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:40:49 +0100
committerChristopher Baines <mail@cbaines.net>2018-07-16 07:38:06 +0100
commit45b81b32ad2eb57357ff1d9437ddf5c200e50511 (patch)
treeb111432022b46bea7b4167471b84f17cdf647649
parentb15159d2b5b8fff36cdc5e4854d3977617eb8d13 (diff)
downloadguix-45b81b32ad2eb57357ff1d9437ddf5c200e50511.tar
guix-45b81b32ad2eb57357ff1d9437ddf5c200e50511.tar.gz
gnu: Add ruby-oj.
-rw-r--r--gnu/packages/ruby.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 95ecdc4916..1968cf4700 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5016,3 +5016,39 @@ is compatible with the JSON gem, so yajl-ruby can act as a drop in
replacement.")
(home-page "https://github.com/brianmario/yajl-ruby")
(license license:expat)))
+
+(define-public ruby-oj
+ (package
+ (name "ruby-oj")
+ (version "3.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ ;; Version on rubygems.org does not contain Rakefile, so download from
+ ;; GitHub instead.
+ (uri (string-append "https://github.com/ohler55/oj/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1vhjkmnyllkiwpwqh6swbam826ch2vhrjqmbys2ki6wh48vzknlb"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:test-target "test_all"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'disable-bundler
+ (lambda _
+ (substitute* "Rakefile"
+ (("Bundler\\.with_clean_env") "1.times")
+ (("bundle exec ") "")))))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)))
+ (synopsis "JSON parser for Ruby optimized for speed")
+ (description
+ "Oj is a JSON parser and generator for Ruby, where the encoding and
+decoding of JSON is implemented as a C extension to Ruby.")
+ (home-page "http://www.ohler.com/oj")
+ (license license:expat)))