1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
3 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages markdown)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix build-system trivial)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages python)
28 #:use-module (gnu packages web)
29 #:use-module (gnu packages zip))
31 (define-public hoedown
37 (uri (string-append "https://github.com/hoedown/hoedown/archive/"
39 (file-name (string-append name "-" version ".tar.gz"))
42 "0mmmkfayqgh6k39kbi3pq68mg03x35aiygy3zypxzvwx9y8b53ky"))))
43 (build-system gnu-build-system)
45 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
46 #:phases (modify-phases %standard-phases
47 (delete 'configure)) ; no configure script
48 #:test-target "test"))
50 `(("python" ,python-2)
52 (synopsis "Markdown processing library")
53 (description "Hoedown is a standards compliant, fast, secure markdown
54 processing library written in C.")
55 (home-page "https://github.com/hoedown/hoedown")
58 (define-public markdown
66 "http://daringfireball.net/projects/downloads/"
67 (string-capitalize name) "_" version ".zip"))
69 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
70 (build-system trivial-build-system)
72 '(#:modules ((guix build utils))
75 (use-modules (guix build utils))
76 (let ((source (assoc-ref %build-inputs "source"))
77 (out (assoc-ref %outputs "out"))
78 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
79 (unzip (string-append (assoc-ref %build-inputs "unzip")
82 (with-directory-excursion out
83 (system* unzip source)
86 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
87 (rename-file "Markdown_1.0.1/Markdown Readme.text"
89 (patch-shebang "bin/markdown" (list perlbd))
90 (delete-file-recursively "Markdown_1.0.1"))))))
91 (native-inputs `(("unzip" ,unzip)))
92 (inputs `(("perl" ,perl)))
93 (home-page "http://daringfireball.net/projects/markdown")
94 (synopsis "Text-to-HTML conversion tool")
96 "Markdown is a text-to-HTML conversion tool for web writers. It allows
97 you to write using an easy-to-read, easy-to-write plain text format, then
98 convert it to structurally valid XHTML (or HTML).")
99 (license (non-copyleft "file://License.text"
100 "See License.text in the distribution."))))