guix-commits
[Top][All Lists]
Advanced

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

14/20: gnu: Add ruby-fast-gettext.


From: guix-commits
Subject: 14/20: gnu: Add ruby-fast-gettext.
Date: Wed, 20 May 2020 17:53:33 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 4a98314da9f308bba230fa3e5117e404f7aedd51
Author: Marius Bakke <address@hidden>
AuthorDate: Wed May 20 19:45:20 2020 +0200

    gnu: Add ruby-fast-gettext.
    
    * gnu/packages/ruby.scm (ruby-fast-gettext): New public variable.
---
 gnu/packages/ruby.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 70ed0df..97789c1 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")



reply via email to

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