diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-05-20 19:45:20 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-05-20 23:51:26 +0200 |
commit | 4a98314da9f308bba230fa3e5117e404f7aedd51 (patch) | |
tree | b99d7da6940d5022812e86d988158e2ef07382e3 | |
parent | 96bf7521e0918b055a2e9fa7a09183f04c97165b (diff) | |
download | guix-4a98314da9f308bba230fa3e5117e404f7aedd51.tar.gz guix-4a98314da9f308bba230fa3e5117e404f7aedd51.zip |
gnu: Add ruby-fast-gettext.
* gnu/packages/ruby.scm (ruby-fast-gettext): New public variable.
-rw-r--r-- | gnu/packages/ruby.scm | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 70ed0dfd0f..97789c1f40 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2406,6 +2406,65 @@ interface for Ruby programs.") (home-page "https://github.com/mperham/connection_pool") (license license:expat))) +(define-public ruby-fast-gettext + (package + (name "ruby-fast-gettext") + (version "2.0.2") + (home-page "https://github.com/grosser/fast_gettext") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rd48fp89k1sclgn2v26br2glwl3iv7z72mizzzmkdmqalqfn1sa")))) + (build-system ruby-build-system) + (arguments + '(#:test-target "spec" + #:phases (modify-phases %standard-phases + (add-before 'check 'remove-version-constraints + (lambda _ + (delete-file "Gemfile.lock") + #t)) + (add-before 'check 'remove-activerecord-test + (lambda _ + ;; FIXME: This test fails because ActiveRecord depends on + ;; a different version of ruby-sqlite than the currently + ;; available one. + (delete-file + "spec/fast_gettext/translation_repository/db_spec.rb") + #t)) + (add-before 'check 'disable-i18n-test + (lambda _ + ;; XXX: This test checks i18n intricasies with Rails 3 and + ;; automatically disables itself for Rails 4.0, but does + ;; not know about newer versions as it has not been updated + ;; since 2014. Disable for later versions of Rails too. + (substitute* "spec/fast_gettext/vendor/string_spec.rb" + (((string-append "ActiveRecord::VERSION::MAJOR == 4 and " + "ActiveRecord::VERSION::MINOR == 0")) + "ActiveRecord::VERSION::MAJOR >= 4")) + #t))))) + (native-inputs + `(;; For tests. + ("ruby-activerecord" ,ruby-activerecord) + ("ruby-activesupport" ,ruby-activesupport) + ("ruby-bump" ,ruby-bump) + ("ruby-forking-test-runner" ,ruby-forking-test-runner) + ("ruby-i18n" ,ruby-i18n) + ("ruby-rubocop" ,ruby-rubocop) + ("ruby-rspec" ,ruby-rspec) + ("ruby-single-cov" ,ruby-single-cov) + ("ruby-sqlite3" ,ruby-sqlite3) + ("ruby-wwtd" ,ruby-wwtd))) + (synopsis "Fast implementation of @code{GetText}") + (description + "This package provides an alternative implementation of the Ruby +@code{GetText} library that is approximately 12x faster yet thread safe.") + ;; Some parts are covered by the Ruby license, see file headers. + (license (list license:expat license:ruby)))) + (define-public ruby-net-http-persistent (package (name "ruby-net-http-persistent") |