gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / markup.scm
CommitLineData
7782d3a6 1;;; GNU Guix --- Functional package management for GNU
bae87762 2;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
7782d3a6 3;;; Copyright © 2015 David Thompson <davet@gnu.org>
d71af69d 4;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
47956fa0 5;;; Copyright © 2017 ng0 <ng0@n0.is>
67e4abc5 6;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
7782d3a6
DT
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
e5eede3f 23(define-module (gnu packages markup)
7782d3a6
DT
24 #:use-module (guix licenses)
25 #:use-module (guix download)
62b3a9b4 26 #:use-module (guix git-download)
7782d3a6
DT
27 #:use-module (guix packages)
28 #:use-module (guix build-system gnu)
bae87762 29 #:use-module (guix build-system trivial)
80588800 30 #:use-module (guix build-system cmake)
9d46919f 31 #:use-module (guix build-system perl)
148585c2 32 #:use-module (gnu packages compression)
9d46919f 33 #:use-module (gnu packages)
bae87762 34 #:use-module (gnu packages perl)
7782d3a6 35 #:use-module (gnu packages python)
148585c2 36 #:use-module (gnu packages web))
7782d3a6
DT
37
38(define-public hoedown
39 (package
40 (name "hoedown")
67eb3857 41 (version "3.0.7")
7782d3a6 42 (source (origin
d71af69d
EF
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/hoedown/hoedown.git")
46 (commit version)))
47 (file-name (git-file-name name version))
7782d3a6
DT
48 (sha256
49 (base32
d71af69d 50 "1kr3hxjg2dgmwy9738qgj3sh3f5cygx0zxskkfhrg7x19bq9yd26"))))
7782d3a6
DT
51 (build-system gnu-build-system)
52 (arguments
606a106f
MW
53 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
54 #:phases (modify-phases %standard-phases
7782d3a6
DT
55 (delete 'configure)) ; no configure script
56 #:test-target "test"))
57 (native-inputs
58 `(("python" ,python-2)
59 ("tidy" ,tidy)))
60 (synopsis "Markdown processing library")
61 (description "Hoedown is a standards compliant, fast, secure markdown
62processing library written in C.")
63 (home-page "https://github.com/hoedown/hoedown")
64 (license expat)))
bae87762
ML
65
66(define-public markdown
67 (package
68 (name "markdown")
69 (version "1.0.1")
70 (source
71 (origin
72 (method url-fetch)
73 (uri (string-append
74 "http://daringfireball.net/projects/downloads/"
75 (string-capitalize name) "_" version ".zip"))
76 (sha256
77 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
78 (build-system trivial-build-system)
79 (arguments
80 '(#:modules ((guix build utils))
81 #:builder
82 (begin
83 (use-modules (guix build utils))
84 (let ((source (assoc-ref %build-inputs "source"))
85 (out (assoc-ref %outputs "out"))
86 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
87 (unzip (string-append (assoc-ref %build-inputs "unzip")
88 "/bin/unzip")))
89 (mkdir-p out)
90 (with-directory-excursion out
e3cfef22 91 (invoke unzip source)
bae87762
ML
92 (mkdir "bin")
93 (mkdir-p "share/doc")
94 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
95 (rename-file "Markdown_1.0.1/Markdown Readme.text"
96 "share/doc/README")
97 (patch-shebang "bin/markdown" (list perlbd))
e3cfef22
MW
98 (delete-file-recursively "Markdown_1.0.1"))
99 #t))))
bae87762
ML
100 (native-inputs `(("unzip" ,unzip)))
101 (inputs `(("perl" ,perl)))
102 (home-page "http://daringfireball.net/projects/markdown")
103 (synopsis "Text-to-HTML conversion tool")
104 (description
105 "Markdown is a text-to-HTML conversion tool for web writers. It allows
106you to write using an easy-to-read, easy-to-write plain text format, then
107convert it to structurally valid XHTML (or HTML).")
108 (license (non-copyleft "file://License.text"
109 "See License.text in the distribution."))))
80588800 110
31d3a7c7
CB
111(define-public discount
112 (package
113 (name "discount")
7e72f547 114 (version "2.2.4")
31d3a7c7
CB
115 (source (origin
116 (method url-fetch)
117 (uri (string-append
118 "http://www.pell.portland.or.us/~orc/Code/"
ad0b91bd 119 "discount/discount-" version ".tar.bz2"))
31d3a7c7
CB
120 (sha256
121 (base32
7e72f547 122 "199hwajpspqil0a4y3yxsmhdp2dm73gqkzfk4mrwzsmlq8y1xzbl"))))
31d3a7c7
CB
123 (build-system gnu-build-system)
124 (arguments
125 `(#:test-target "test"
126 #:make-flags (list
127 (string-append "LFLAGS=-L. -Wl,-rpath="
128 (assoc-ref %outputs "out") "/lib"))
129 #:phases
130 (modify-phases %standard-phases
131 (add-before 'configure 'set-AC_PATH
132 (lambda _
133 ;; The default value is not suitable, so override using an
134 ;; environment variable. This just affects the build, and not the
135 ;; resulting store item.
136 (setenv "AC_PATH" (getenv "PATH"))
137 #t))
138 (replace 'configure
139 (lambda* (#:key inputs outputs #:allow-other-keys)
140 (setenv "CC" "gcc")
3a28209c 141 (invoke "./configure.sh"
31d3a7c7 142 (string-append "--prefix=" (assoc-ref outputs "out"))
3a28209c 143 "--shared"))))))
31d3a7c7
CB
144 (synopsis "Markdown processing library, written in C")
145 (description
146 "Discount is a markdown implementation, written in C. It provides a
147@command{markdown} command, and a library.")
7fcb3935 148 (home-page "https://www.pell.portland.or.us/~orc/Code/discount/")
31d3a7c7
CB
149 (license bsd-3)))
150
9d46919f
CB
151(define-public perl-text-markdown-discount
152 (package
153 (name "perl-text-markdown-discount")
154 (version "0.11")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (string-append
159 "mirror://cpan/authors/id/S/SE/SEKIMURA/Text-Markdown-Discount-"
160 version
161 ".tar.gz"))
162 (sha256
163 (base32
164 "1xx7v3wnla7m6wa3h33whxw3vvincaicg4yra1b9wbzf2aix9rnw"))
165 (patches
1da3d2a3 166 (search-patches "perl-text-markdown-discount-unbundle.patch"))))
9d46919f
CB
167 (build-system perl-build-system)
168 (arguments
169 `(#:phases
170 (modify-phases %standard-phases
171 (add-before 'build 'set-ldflags
172 (lambda* (#:key inputs #:allow-other-keys)
173 (substitute* "Makefile"
174 (("OTHERLDFLAGS = ")
175 (string-append
176 "OTHERLDFLAGS = -lmarkdown -Wl,-rpath="
177 (assoc-ref inputs "discount")
4851af9e
MW
178 "/lib")))
179 #t)))))
9d46919f
CB
180 (inputs
181 `(("discount" ,discount)))
182 (home-page
9aba9b12 183 "https://metacpan.org/release/Text-Markdown-Discount")
9d46919f
CB
184 (synopsis
185 "Fast function for converting Markdown to HTML using Discount")
186 (description
187 "Text::Markdown::Discount is a Perl extension to the Discount markdown
188implementation.
189
190@example
191 use Text::Markdown::Discount;
192 my $html = markdown($text)
193@end example")
194 (license perl-license)))
195
80588800
EE
196(define-public cmark
197 (package
198 (name "cmark")
88409717 199 (version "0.29.0")
80588800 200 (source (origin
2c24b96b
EF
201 (method git-fetch)
202 (uri (git-reference
203 (url "https://github.com/jgm/cmark.git")
204 (commit version)))
205 (file-name (git-file-name name version))
80588800
EE
206 (sha256
207 (base32
88409717 208 "0r7jpqhgnssq444i8pwji2g36058vfzwkl70wbiwj13h4w5rfc8f"))))
80588800
EE
209 (build-system cmake-build-system)
210 (arguments
211 '(#:test-target "test"))
212 (native-inputs `(("python" ,python)))
213 (synopsis "CommonMark Markdown reference implementation")
214 (description "CommonMark is a strongly defined, highly compatible
215specification of Markdown. cmark is the C reference implementation of
216CommonMark. It provides @code{libcmark} shared library for parsing
554245da 217CommonMark to an abstract syntax tree (@dfn{AST}) and rendering the document
80588800
EE
218as HTML, groff man, LaTeX, CommonMark, or an XML representation of the
219AST. The package also provides the command-line program @command{cmark}
220for parsing and rendering CommonMark.")
221 (home-page "http://commonmark.org")
222 ;; cmark is distributed with a BSD-2 license, but some components are Expat
223 ;; licensed. The CommonMark specification is Creative Commons CC-BY-SA 4.0
224 ;; licensed. See 'COPYING' in the source distribution for more information.
225 (license (list bsd-2 expat cc-by-sa4.0))))
83f0d3a5 226
227(define-public smu
228 (package
229 (name "smu")
67e4abc5 230 (version "1.5")
83f0d3a5 231 (source
232 (origin
62b3a9b4
TGR
233 (method git-fetch)
234 (uri (git-reference
235 (url "https://github.com/Gottox/smu.git")
236 (commit (string-append "v" version))))
237 (file-name (git-file-name name version))
83f0d3a5 238 (sha256
62b3a9b4 239 (base32 "1jm7lhnzjx4q7gcwlkvsbffcy0zppywyh50d71ami6dnq182vvcc"))))
83f0d3a5 240 (build-system gnu-build-system)
241 (arguments
242 `(#:make-flags (list "CC=gcc"
243 (string-append "PREFIX="
244 (assoc-ref %outputs "out")))
67e4abc5 245 #:tests? #f ; no tests included
83f0d3a5 246 #:phases
247 (modify-phases %standard-phases
248 (delete 'configure))))
249 (home-page "https://github.com/Gottox/smu")
250 (synopsis "Simple markup")
251 (description
252 "Smu is a very simple and minimal markup language. It is
253designed for using in wiki-like environments. Smu makes it very
254easy to write your documents on the fly and convert them into HTML.
255Smu is capable to parse very large documents. As long as you avoid an huge
256amount of indents it scales just great.
257
258Smu was started as a rewrite of Markdown but became something more
259lightweight and consistent. The biggest difference between Markdown
260and smu is that smu doesn't support reference style links.")
261 (license x11)))