gnu: capnproto: Update to 0.6.1.
[jackhill/guix/guix.git] / gnu / packages / markdown.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>
67eb3857 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7782d3a6
DT
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages markdown)
22 #:use-module (guix licenses)
23 #:use-module (guix download)
24 #:use-module (guix packages)
25 #:use-module (guix build-system gnu)
bae87762 26 #:use-module (guix build-system trivial)
80588800 27 #:use-module (guix build-system cmake)
bae87762 28 #:use-module (gnu packages perl)
7782d3a6 29 #:use-module (gnu packages python)
bae87762
ML
30 #:use-module (gnu packages web)
31 #:use-module (gnu packages zip))
7782d3a6
DT
32
33(define-public hoedown
34 (package
35 (name "hoedown")
67eb3857 36 (version "3.0.7")
7782d3a6
DT
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "https://github.com/hoedown/hoedown/archive/"
40 version ".tar.gz"))
41 (file-name (string-append name "-" version ".tar.gz"))
42 (sha256
43 (base32
67eb3857 44 "0859dc2xjasd6kgkshi8mb20kbyw5sql1ln0hw3bfaf33qdh5dh1"))))
7782d3a6
DT
45 (build-system gnu-build-system)
46 (arguments
606a106f
MW
47 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
48 #:phases (modify-phases %standard-phases
7782d3a6
DT
49 (delete 'configure)) ; no configure script
50 #:test-target "test"))
51 (native-inputs
52 `(("python" ,python-2)
53 ("tidy" ,tidy)))
54 (synopsis "Markdown processing library")
55 (description "Hoedown is a standards compliant, fast, secure markdown
56processing library written in C.")
57 (home-page "https://github.com/hoedown/hoedown")
58 (license expat)))
bae87762
ML
59
60(define-public markdown
61 (package
62 (name "markdown")
63 (version "1.0.1")
64 (source
65 (origin
66 (method url-fetch)
67 (uri (string-append
68 "http://daringfireball.net/projects/downloads/"
69 (string-capitalize name) "_" version ".zip"))
70 (sha256
71 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
72 (build-system trivial-build-system)
73 (arguments
74 '(#:modules ((guix build utils))
75 #:builder
76 (begin
77 (use-modules (guix build utils))
78 (let ((source (assoc-ref %build-inputs "source"))
79 (out (assoc-ref %outputs "out"))
80 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
81 (unzip (string-append (assoc-ref %build-inputs "unzip")
82 "/bin/unzip")))
83 (mkdir-p out)
84 (with-directory-excursion out
85 (system* unzip source)
86 (mkdir "bin")
87 (mkdir-p "share/doc")
88 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
89 (rename-file "Markdown_1.0.1/Markdown Readme.text"
90 "share/doc/README")
91 (patch-shebang "bin/markdown" (list perlbd))
92 (delete-file-recursively "Markdown_1.0.1"))))))
93 (native-inputs `(("unzip" ,unzip)))
94 (inputs `(("perl" ,perl)))
95 (home-page "http://daringfireball.net/projects/markdown")
96 (synopsis "Text-to-HTML conversion tool")
97 (description
98 "Markdown is a text-to-HTML conversion tool for web writers. It allows
99you to write using an easy-to-read, easy-to-write plain text format, then
100convert it to structurally valid XHTML (or HTML).")
101 (license (non-copyleft "file://License.text"
102 "See License.text in the distribution."))))
80588800
EE
103
104(define-public cmark
105 (package
106 (name "cmark")
95b80db6 107 (version "0.27.1")
80588800
EE
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "https://github.com/jgm/cmark/archive/"
111 version ".tar.gz"))
112 (file-name (string-append name "-" version ".tar.gz"))
113 (sha256
114 (base32
95b80db6 115 "1da62ispca9aal2a36gaj87175rv5013pl7x740vk32y6lclr6v6"))))
80588800
EE
116 (build-system cmake-build-system)
117 (arguments
118 '(#:test-target "test"))
119 (native-inputs `(("python" ,python)))
120 (synopsis "CommonMark Markdown reference implementation")
121 (description "CommonMark is a strongly defined, highly compatible
122specification of Markdown. cmark is the C reference implementation of
123CommonMark. It provides @code{libcmark} shared library for parsing
124CommonMark to an abstract syntax tree (AST) and rendering the document
125as HTML, groff man, LaTeX, CommonMark, or an XML representation of the
126AST. The package also provides the command-line program @command{cmark}
127for parsing and rendering CommonMark.")
128 (home-page "http://commonmark.org")
129 ;; cmark is distributed with a BSD-2 license, but some components are Expat
130 ;; licensed. The CommonMark specification is Creative Commons CC-BY-SA 4.0
131 ;; licensed. See 'COPYING' in the source distribution for more information.
132 (license (list bsd-2 expat cc-by-sa4.0))))