aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:48:52 +0100
committerChristopher Baines <mail@cbaines.net>2018-12-31 10:01:11 +0000
commit70d8ffaa2cd25d0f0b65cf64daf2cc4ffc2b5d12 (patch)
tree3420b68d41434b72282b1cda00982161a9704e83
parentc7dae4c3b38fdf0de8eae7e2de29a068dd64abcb (diff)
downloadgnu-guix-70d8ffaa2cd25d0f0b65cf64daf2cc4ffc2b5d12.tar
gnu-guix-70d8ffaa2cd25d0f0b65cf64daf2cc4ffc2b5d12.tar.gz
gnu: Add ruby-libv8.
-rw-r--r--gnu/packages/ruby.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 91b47dfa27..df519978f3 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3987,6 +3987,71 @@ a native C extension.")
(home-page "https://rubygems.org/gems/rb-fsevent")
(license license:expat)))
+(define-public ruby-libv8
+ (package
+ (name "ruby-libv8")
+ (version "6.7.288.46.0") ; Package an even-numbered release so only source
+ ; code it included and not binaries.
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "libv8" version))
+ (sha256
+ (base32
+ "1f1gd8n8yrnd2d2bmlbcm1qgfpw050087y8gq4z72cj8mal60k3f"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:test-target "spec"
+ ;#:gem-flags (list "--" "--with-system-v8")
+ #:phases
+ (modify-phases %standard-phases
+ ;; Non-printing characters trip up this build phase and it isn't used
+ ;; anyway.
+ ;(delete 'extract-gemspec)
+ ;; (replace 'replace-git-ls-files
+ ;; (lambda _
+ ;; (substitute* "libv8.gemspec"
+ ;; (("git ls-files") "find . -type f |sort"))
+ ;; #t))
+ (add-after 'extract-gemspec 'fix-dependencies
+ (lambda _
+ ;; Remove non-printing character that trips up substitute*
+ (system* "sed" "s/ stub.*//" "-i" "libv8.gemspec")
+ ;;(delete-file-recursively "vendor")
+ (substitute* "libv8.gemspec"
+ ;; (("<rake>.*") "<rake>)\n")
+ (("<rake-compiler>.*") "<rake-compiler>)\n")
+ ((", \\\"vendor.*") "]\n")
+ ) ; Do not distribute
+ ; depot_tools as this includes pre-built
+ ; binaries.
+
+ #t))
+ )))
+ ;; (Add-after 'install 'remove-extraneous-files
+ ;; (lambda* (#:key outputs #:allow-other-keys)
+ ;; (delete-file-recursively
+ ;; (string-append
+ ;; (assoc-ref outputs "out")
+ ;; ;; TODO: Generalise this path.
+ ;; "/lib/ruby/gems/2.3.0/gems/libv8-5.2.361.43.1/vendor")))))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rake" ,ruby-rake)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-rspec-spies" ,ruby-rspec-spies)
+ ("which" ,which)
+ ("python" ,python-2)))
+ (synopsis
+ "Distributes the V8 JavaScript engine in binary and source forms in order
+to support fast builds of The Ruby Racer")
+ (description
+ "Distributes the V8 JavaScript engine in binary and source forms in order
+to support fast builds of The Ruby Racer")
+ (home-page "http://github.com/cowboyd/libv8")
+ (license license:expat)))
+
(define-public ruby-listen
(package
(name "ruby-listen")