gnu: Add ruby-pygmentize.

* gnu/packages/ruby.scm (ruby-pygmentize): New variable.
This commit is contained in:
Ricardo Wurmus 2015-11-25 16:59:05 +01:00
parent 0c80451e81
commit ac09beba84
1 changed files with 41 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (gnu packages java) #:use-module (gnu packages java)
#:use-module (gnu packages libffi) #:use-module (gnu packages libffi)
#:use-module (gnu packages python)
#:use-module (gnu packages ragel) #:use-module (gnu packages ragel)
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
#:use-module (gnu packages version-control) #:use-module (gnu packages version-control)
@ -2743,6 +2744,46 @@ simple case of executing code based on the flags or parameters passed.")
(home-page "https://github.com/djanowski/cutest") (home-page "https://github.com/djanowski/cutest")
(license license:expat))) (license license:expat)))
(define-public ruby-pygmentize
(package
(name "ruby-pygmentize")
(version "0.0.3")
(source (origin
(method url-fetch)
(uri (rubygems-uri "pygmentize" version))
(sha256
(base32
"1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-pygmentize-path
(lambda _
(substitute* "lib/pygmentize.rb"
(("\"/usr/bin/env python.*")
(string-append "\"" (which "pygmentize") "\"\n")))
#t))
(add-after 'build 'do-not-use-vendor-directory
(lambda _
;; Remove bundled pygments sources
;; FIXME: ruby-build-system does not support snippets.
(delete-file-recursively "vendor")
(substitute* "pygmentize.gemspec"
(("\"vendor/\\*\\*/\\*\",") ""))
#t)))))
(inputs
`(("pygments" ,python-pygments)))
(native-inputs
`(("ruby-cutest" ,ruby-cutest)
("ruby-nokogiri" ,ruby-nokogiri)))
(synopsis "Thin Ruby wrapper around pygmentize")
(description
"Pygmentize provides a simple way to call pygmentize from within a Ruby
application.")
(home-page "https://github.com/djanowski/pygmentize")
(license license:expat)))
(define-public ruby-eventmachine (define-public ruby-eventmachine
(package (package
(name "ruby-eventmachine") (name "ruby-eventmachine")