From 0c4e762570dfb46d554b30ef14b27cd808ffcff6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 25 Nov 2015 17:25:22 +0100 Subject: gnu: Add ruby-redcloth. * gnu/packages/ruby.scm (ruby-redcloth): New variable. --- gnu/packages/ruby.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gnu/packages') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 846e358554..1bd3fe2c9a 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2422,6 +2422,45 @@ alternative to Marshal for Object serialization. ") (home-page "http://www.ohler.com/ox") (license license:expat))) +(define-public ruby-redcloth + (package + (name "ruby-redcloth") + (version "4.2.9") + (source (origin + (method url-fetch) + (uri (rubygems-uri "RedCloth" version)) + (sha256 + (base32 + "06pahxyrckhgb7alsxwhhlx1ib2xsx33793finj01jk8i054bkxl")))) + (build-system ruby-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + ;; Redcloth has complicated rake tasks to build various versions for + ;; multiple targets using RVM. We don't want this so we just use the + ;; existing gemspec. + (replace 'build + (lambda _ + (zero? (system* "gem" "build" "redcloth.gemspec")))) + ;; Make sure that the "redcloth" executable finds required Ruby + ;; libraries. + (add-after 'install 'wrap-bin-redcloth + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") + "/bin/redcloth") + `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME")))) + #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-diff-lcs" ,ruby-diff-lcs) + ("ruby-rspec-2" ,ruby-rspec-2))) + (synopsis "Textile markup language parser for Ruby") + (description + "RedCloth is a Ruby parser for the Textile markup language.") + (home-page "http://redcloth.org") + (license license:expat))) + (define-public ruby-pg (package (name "ruby-pg") -- cgit v1.2.3