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