aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:48:52 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 11:54:03 +0100
commit0cebf80004769904f2ca6a36db527dc1120e7d03 (patch)
tree6017550b8b84b051bda64123432281ea51390855
parent772f164914ee311367dd29949089c1266408133c (diff)
downloadguix-0cebf80004769904f2ca6a36db527dc1120e7d03.tar
guix-0cebf80004769904f2ca6a36db527dc1120e7d03.tar.gz
gnu: Add ruby-libv8-3.16.14.
-rw-r--r--gnu/packages/ruby.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index faa814d1ed..930dc933d8 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -6375,3 +6375,65 @@ implementation of maps/hashes that use references and a reference queue.")
(home-page
"http://github.com/cowboyd/therubyracer")
(license license:expat)))
+
+(define-public ruby-libv8-3.16.14
+ (package
+ (name "ruby-libv8")
+ (version "3.16.14.14") ; 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
+ "1sipv60i1fxia2y08q2n2q179pxizhnx9065x8630wdnvbpqrl0x"))))
+ (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")
+ ;; ((", \\\"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-compiler" ,ruby-rake-compiler)
+ ("ruby-rspec" ,ruby-rspec-2)
+ ("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)))