From 45b81b32ad2eb57357ff1d9437ddf5c200e50511 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Mon, 5 Feb 2018 11:40:49 +0100 Subject: gnu: Add ruby-oj. --- gnu/packages/ruby.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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))) -- cgit v1.2.3