1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
3 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 ng0 <ng0@no-reply.pragmatique.xyz>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages markup)
23 #:use-module (guix licenses)
24 #:use-module (guix download)
25 #:use-module (guix packages)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix build-system trivial)
28 #:use-module (guix build-system cmake)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages web))
34 (define-public hoedown
40 (uri (string-append "https://github.com/hoedown/hoedown/archive/"
42 (file-name (string-append name "-" version ".tar.gz"))
45 "0859dc2xjasd6kgkshi8mb20kbyw5sql1ln0hw3bfaf33qdh5dh1"))))
46 (build-system gnu-build-system)
48 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
49 #:phases (modify-phases %standard-phases
50 (delete 'configure)) ; no configure script
51 #:test-target "test"))
53 `(("python" ,python-2)
55 (synopsis "Markdown processing library")
56 (description "Hoedown is a standards compliant, fast, secure markdown
57 processing library written in C.")
58 (home-page "https://github.com/hoedown/hoedown")
61 (define-public markdown
69 "http://daringfireball.net/projects/downloads/"
70 (string-capitalize name) "_" version ".zip"))
72 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
73 (build-system trivial-build-system)
75 '(#:modules ((guix build utils))
78 (use-modules (guix build utils))
79 (let ((source (assoc-ref %build-inputs "source"))
80 (out (assoc-ref %outputs "out"))
81 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
82 (unzip (string-append (assoc-ref %build-inputs "unzip")
85 (with-directory-excursion out
86 (system* unzip source)
89 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
90 (rename-file "Markdown_1.0.1/Markdown Readme.text"
92 (patch-shebang "bin/markdown" (list perlbd))
93 (delete-file-recursively "Markdown_1.0.1"))))))
94 (native-inputs `(("unzip" ,unzip)))
95 (inputs `(("perl" ,perl)))
96 (home-page "http://daringfireball.net/projects/markdown")
97 (synopsis "Text-to-HTML conversion tool")
99 "Markdown is a text-to-HTML conversion tool for web writers. It allows
100 you to write using an easy-to-read, easy-to-write plain text format, then
101 convert it to structurally valid XHTML (or HTML).")
102 (license (non-copyleft "file://License.text"
103 "See License.text in the distribution."))))
111 (uri (string-append "https://github.com/jgm/cmark/archive/"
113 (file-name (string-append name "-" version ".tar.gz"))
116 "03pypf2mcacfa7lrwz66lh5hydsycc33arp1nx1lljbq98gikkv8"))))
117 (build-system cmake-build-system)
119 '(#:test-target "test"))
120 (native-inputs `(("python" ,python)))
121 (synopsis "CommonMark Markdown reference implementation")
122 (description "CommonMark is a strongly defined, highly compatible
123 specification of Markdown. cmark is the C reference implementation of
124 CommonMark. It provides @code{libcmark} shared library for parsing
125 CommonMark to an abstract syntax tree (AST) and rendering the document
126 as HTML, groff man, LaTeX, CommonMark, or an XML representation of the
127 AST. The package also provides the command-line program @command{cmark}
128 for parsing and rendering CommonMark.")
129 (home-page "http://commonmark.org")
130 ;; cmark is distributed with a BSD-2 license, but some components are Expat
131 ;; licensed. The CommonMark specification is Creative Commons CC-BY-SA 4.0
132 ;; licensed. See 'COPYING' in the source distribution for more information.
133 (license (list bsd-2 expat cc-by-sa4.0))))
142 (uri (string-append "https://github.com/Gottox/smu/archive/v"
144 (file-name (string-append name "-" version ".tar.gz"))
147 "0iazl45rkz8ngsb5hpykl76w0ngvdvqqhym1qz5wykgmrzk293rp"))))
148 (build-system gnu-build-system)
150 `(#:make-flags (list "CC=gcc"
151 (string-append "PREFIX="
152 (assoc-ref %outputs "out")))
153 #:tests? #f ;No tests included
155 (modify-phases %standard-phases
156 (delete 'configure))))
157 (home-page "https://github.com/Gottox/smu")
158 (synopsis "Simple markup")
160 "Smu is a very simple and minimal markup language. It is
161 designed for using in wiki-like environments. Smu makes it very
162 easy to write your documents on the fly and convert them into HTML.
163 Smu is capable to parse very large documents. As long as you avoid an huge
164 amount of indents it scales just great.
166 Smu was started as a rewrite of Markdown but became something more
167 lightweight and consistent. The biggest difference between Markdown
168 and smu is that smu doesn't support reference style links.")