[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
35/66: gnu: Add ruby-mysql2.
From: |
guix-commits |
Subject: |
35/66: gnu: Add ruby-mysql2. |
Date: |
Thu, 14 Feb 2019 16:38:37 -0500 (EST) |
cbaines pushed a commit to branch master
in repository guix.
commit b8aecc31b4f3cdad7a3d5b44af3e541ad1ad9d03
Author: Christopher Baines <address@hidden>
Date: Mon Jan 28 14:51:47 2019 +0000
gnu: Add ruby-mysql2.
Required for ruby-parallel.
* gnu/packages/ruby.scm (ruby-mysql2): New variable.
---
gnu/packages/ruby.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d8aa27d..df0969e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1959,6 +1959,64 @@ specs for Ruby implementations in ruby/spec.")
(home-page "http://rubyspec.org")
(license license:expat)))
+(define-public ruby-mysql2
+ (package
+ (name "ruby-mysql2")
+ (version "0.5.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/brianmario/mysql2.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(;; TODO: Tests require a running MySQL/MariaDB service
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'replace-git-ls-files
+ (lambda _
+ (substitute* "mysql2.gemspec"
+ (("git ls-files .*`") "find . -type f |sort`"))
+ #t))
+ (add-before 'install 'set-MAKEFLAGS
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "MAKEFLAGS"
+ (string-append
+ "V=1 "
+ "prefix=" (assoc-ref outputs "out")))
+ #t))
+ ;; Move the 'check phase to after 'install, as then you can test
+ ;; using the installed mysql2 gem in the store.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key outputs tests? #:allow-other-keys)
+ (setenv "GEM_PATH"
+ (string-append
+ (getenv "GEM_PATH")
+ ":"
+ (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
+ (when tests?
+ (invoke "rspec"))
+ #t)))))
+ (inputs
+ `(("mariadb" ,mariadb)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("ruby-rspec" ,ruby-rspec)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)))
+ (synopsis "MySQL library for Ruby, binding to libmysql")
+ (description
+ "This package provides a simple, fast MySQL library for Ruby, binding to
+libmysql.")
+ (home-page "https://github.com/brianmario/mysql2")
+ (license license:expat)))
+
(define-public ruby-blankslate
(package
(name "ruby-blankslate")
- 25/66: gnu: Add ruby-unicode-display-width., (continued)
- 25/66: gnu: Add ruby-unicode-display-width., guix-commits, 2019/02/14
- 15/66: gnu: Add ruby-rainbow., guix-commits, 2019/02/14
- 42/66: gnu: ruby-parallel: Begin to enable tests and update version., guix-commits, 2019/02/14
- 52/66: gnu: Add ruby-actionview., guix-commits, 2019/02/14
- 46/66: gnu: Add ruby-rr., guix-commits, 2019/02/14
- 63/66: gnu: Add ruby-sprockets-rails., guix-commits, 2019/02/14
- 59/66: gnu: Add ruby-activejob., guix-commits, 2019/02/14
- 28/66: gnu: Add ruby-maruku., guix-commits, 2019/02/14
- 30/66: gnu: Add ruby-minitest-reporters., guix-commits, 2019/02/14
- 45/66: gnu: Add ruby-faraday., guix-commits, 2019/02/14
- 35/66: gnu: Add ruby-mysql2.,
guix-commits <=
- 51/66: gnu: Add ruby-erubi., guix-commits, 2019/02/14
- 44/66: gnu: ruby-prawn-table: Begin to enable tests., guix-commits, 2019/02/14
- 57/66: gnu: Add ruby-actioncable., guix-commits, 2019/02/14