summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-11-25 17:25:22 +0100
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-12-14 14:06:29 +0100
commit0c4e762570dfb46d554b30ef14b27cd808ffcff6 (patch)
treee6f17ae313e835280591f4a06417df0309e4a705 /gnu/packages/ruby.scm
parentd56ff88b6c63bb4f3e7877986b313ed944d6f341 (diff)
downloadguix-0c4e762570dfb46d554b30ef14b27cd808ffcff6.tar.gz
gnu: Add ruby-redcloth.
* gnu/packages/ruby.scm (ruby-redcloth): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm39
1 files changed, 39 insertions, 0 deletions
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")