From 70d8ffaa2cd25d0f0b65cf64daf2cc4ffc2b5d12 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Mon, 5 Feb 2018 11:48:52 +0100 Subject: gnu: Add ruby-libv8. --- gnu/packages/ruby.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) 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" + ;; ((".*") ")\n") + ((".*") ")\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") -- cgit v1.2.3