gnu: Add enet.
[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
ML
26 #:use-module (guix build-system trivial)
27 #:use-module (gnu packages perl)
7782d3a6 28 #:use-module (gnu packages python)
bae87762
ML
29 #:use-module (gnu packages web)
30 #:use-module (gnu packages zip))
7782d3a6
DT
31
32(define-public hoedown
33 (package
34 (name "hoedown")
67eb3857 35 (version "3.0.7")
7782d3a6
DT
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "https://github.com/hoedown/hoedown/archive/"
39 version ".tar.gz"))
40 (file-name (string-append name "-" version ".tar.gz"))
41 (sha256
42 (base32
67eb3857 43 "0859dc2xjasd6kgkshi8mb20kbyw5sql1ln0hw3bfaf33qdh5dh1"))))
7782d3a6
DT
44 (build-system gnu-build-system)
45 (arguments
606a106f
MW
46 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
47 #:phases (modify-phases %standard-phases
7782d3a6
DT
48 (delete 'configure)) ; no configure script
49 #:test-target "test"))
50 (native-inputs
51 `(("python" ,python-2)
52 ("tidy" ,tidy)))
53 (synopsis "Markdown processing library")
54 (description "Hoedown is a standards compliant, fast, secure markdown
55processing library written in C.")
56 (home-page "https://github.com/hoedown/hoedown")
57 (license expat)))
bae87762
ML
58
59(define-public markdown
60 (package
61 (name "markdown")
62 (version "1.0.1")
63 (source
64 (origin
65 (method url-fetch)
66 (uri (string-append
67 "http://daringfireball.net/projects/downloads/"
68 (string-capitalize name) "_" version ".zip"))
69 (sha256
70 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
71 (build-system trivial-build-system)
72 (arguments
73 '(#:modules ((guix build utils))
74 #:builder
75 (begin
76 (use-modules (guix build utils))
77 (let ((source (assoc-ref %build-inputs "source"))
78 (out (assoc-ref %outputs "out"))
79 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
80 (unzip (string-append (assoc-ref %build-inputs "unzip")
81 "/bin/unzip")))
82 (mkdir-p out)
83 (with-directory-excursion out
84 (system* unzip source)
85 (mkdir "bin")
86 (mkdir-p "share/doc")
87 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
88 (rename-file "Markdown_1.0.1/Markdown Readme.text"
89 "share/doc/README")
90 (patch-shebang "bin/markdown" (list perlbd))
91 (delete-file-recursively "Markdown_1.0.1"))))))
92 (native-inputs `(("unzip" ,unzip)))
93 (inputs `(("perl" ,perl)))
94 (home-page "http://daringfireball.net/projects/markdown")
95 (synopsis "Text-to-HTML conversion tool")
96 (description
97 "Markdown is a text-to-HTML conversion tool for web writers. It allows
98you to write using an easy-to-read, easy-to-write plain text format, then
99convert it to structurally valid XHTML (or HTML).")
100 (license (non-copyleft "file://License.text"
101 "See License.text in the distribution."))))