diff options
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 00ad7e8fc1..9d295457ba 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -1428,6 +1428,63 @@ Ruby.") (home-page "https://github.com/maik/xml-simple") (license license:ruby))) +(define-public ruby-therubyracer + (package + (name "ruby-therubyracer") + (version "0.12.2") + (source + (origin + (method url-fetch) + ;; Build from GitHub source so that patches can be applied. + (uri (string-append "https://github.com/cowboyd/therubyracer/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0vyiacgg0hngl3gxh7n5lvskac5ms2rcbjrixj4mc8c2adhmqj1a")) + (patches (search-patches "ruby-therubyracer-fix-gemspec.patch")))) + (build-system ruby-build-system) + (arguments + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (delete 'extract-gemspec) + (add-before 'build 'fix-gemfile + (lambda _ + (substitute* "Gemfile" + (("redjs.*") "redjs'\n") + ((".*gem-compiler.*") "\n")) + #t)) + (add-before 'install 'prepare-libv8 + ;; Since therubyracer requires 'libv8' when compiling native + ;; extensions during installation, it must be installed into the same + ;; gem directory. We make 'libv8' a native input and copy the entire + ;; libv8 gem directory into the the current output and install + ;; therubyracer into that. + (lambda* (#:key inputs outputs #:allow-other-keys) + (copy-recursively + (assoc-ref inputs "ruby-libv8") + (assoc-ref outputs "out")) + #t)) + (add-before 'check 'compile + (lambda _ + (zero? (system* "rake" "compile"))))))) + (propagated-inputs + `(("ruby-ref" ,ruby-ref))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-redjs" ,ruby-redjs) + ("ruby-rspec" ,ruby-rspec-2) + ("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-libv8" ,ruby-libv8))) + (synopsis + "Call JavaScript code and manipulate JavaScript objects from Ruby. Call Ruby code and manipulate Ruby objects from JavaScript.") + (description + "Call JavaScript code and manipulate JavaScript objects from Ruby. Call Ruby code and manipulate Ruby objects from JavaScript.") + (home-page + "http://github.com/cowboyd/therubyracer") + (license license:expat))) + (define-public ruby-thor (package (name "ruby-thor") |