[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/17: gnu: Add ruby-pandoc-ruby.
From: |
guix-commits |
Subject: |
07/17: gnu: Add ruby-pandoc-ruby. |
Date: |
Sat, 11 Jul 2020 14:30:36 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit c84dd8d49c754ee723b8fe8fee04cd0464402303
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Jul 9 22:37:08 2020 -0400
gnu: Add ruby-pandoc-ruby.
* gnu/packages/ruby.scm (ruby-pandoc-ruby): New variable.
---
gnu/packages/ruby.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 18da48a..f906590 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -51,6 +51,7 @@
#:use-module (gnu packages rails)
#:use-module (gnu packages readline)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages java)
#:use-module (gnu packages libffi)
#:use-module (gnu packages libidn)
@@ -984,6 +985,69 @@ line of code.")
;; of the Expat license.
(license license:bsd-3)))
+(define-public ruby-pandoc-ruby
+ (package
+ (name "ruby-pandoc-ruby")
+ (version "2.1.4")
+ (source
+ (origin
+ (method git-fetch) ;the gem lacks many test files
+ (uri (git-reference
+ (url "https://github.com/xwmx/pandoc-ruby.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
+ ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
+ (lambda _
+ (substitute* "test/test_conversions.rb"
+ (("next if from == to.*" all)
+ (string-append
+ all
+ " next if ['plain', 'beamer'].include? to\n")))
+ #t))
+ (add-after 'unpack 'patch-pandoc-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pandoc (string-append (assoc-ref inputs "ghc-pandoc")
+ "/bin/pandoc")))
+ (substitute* "lib/pandoc-ruby.rb"
+ (("@@pandoc_path = 'pandoc'")
+ (format #f "@@pandoc_path = '~a'" pandoc)))
+ (substitute* "test/test_pandoc_ruby.rb"
+ (("('|\")pandoc" _ quote)
+ (string-append quote pandoc))
+ (("\\^pandoc")
+ ".*pandoc"))
+ #t)))
+ (add-after 'extract-gemspec 'remove-Gemfile.lock
+ (lambda _
+ (delete-file "Gemfile.lock")
+ (substitute* "pandoc-ruby.gemspec"
+ (("Gemfile\\.lock") ""))
+ #t)))))
+ (native-inputs
+ `(("ruby-mocha" ,ruby-mocha)))
+ (inputs
+ `(("ghc-pandoc" ,ghc-pandoc)))
+ (synopsis "Ruby wrapper for Pandoc")
+ (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
+command line tools for converting one markup format to another. Pandoc can
+convert documents from a variety of formats including markdown,
+reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
+variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
+ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
+markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
+more.")
+ (home-page "https://github.com/xwmx/pandoc-ruby")
+ (license license:expat)))
+
(define-public ruby-asciidoctor
(package
(name "ruby-asciidoctor")
- branch master updated (3e26bec -> 661ad8d), guix-commits, 2020/07/11
- 01/17: gnu: ruby-asciimath: Update to 2.0.1., guix-commits, 2020/07/11
- 04/17: gnu: ruby-yard: Update to 0.9.25., guix-commits, 2020/07/11
- 06/17: gnu: ruby-cucumber: Enable more tests., guix-commits, 2020/07/11
- 02/17: gnu: ruby-yard: Disable tests., guix-commits, 2020/07/11
- 08/17: gnu: ruby-tilt: Update to 2.0.10., guix-commits, 2020/07/11
- 11/17: gnu: Add ruby-slim., guix-commits, 2020/07/11
- 05/17: gnu: ruby-sinatra: Update to 2.0.8.1., guix-commits, 2020/07/11
- 03/17: gnu: Add ruby-yard-with-tests., guix-commits, 2020/07/11
- 07/17: gnu: Add ruby-pandoc-ruby.,
guix-commits <=
- 12/17: gnu: ruby-asciidoctor: Re-indent., guix-commits, 2020/07/11
- 13/17: gnu: ruby-asciidoctor: Update to 2.0.10., guix-commits, 2020/07/11
- 09/17: gnu: ruby-tilt: Add pandoc, sassc support., guix-commits, 2020/07/11
- 16/17: gnu: Add ruby-yard-tomdoc., guix-commits, 2020/07/11
- 10/17: gnu: ruby-temple: Update to 0.8.2., guix-commits, 2020/07/11
- 15/17: gnu: Add ruby-tomparse., guix-commits, 2020/07/11
- 17/17: gnu: ruby-ruby-prof: Disable a flaky test., guix-commits, 2020/07/11
- 14/17: gnu: Add ruby-spectroscope., guix-commits, 2020/07/11