458d91e56950196fae49291796e4bf1bfe5c2a43
[jackhill/guix/guix.git] / gnu / packages / skribilo.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages skribilo)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix licenses)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages guile)
25 #:use-module (gnu packages lout)
26 #:use-module (gnu packages pkg-config)
27 #:use-module (gnu packages plotutils)
28 #:use-module (gnu packages imagemagick)
29 #:use-module (gnu packages ghostscript))
30
31 (define-public skribilo
32 (package
33 (name "skribilo")
34 (version "0.9.3")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append "mirror://savannah/skribilo/skribilo-"
38 version ".tar.gz"))
39 (sha256
40 (base32
41 "04d8xa76jvlz25jnc6p1gzsplwcwcqrmi3f7ixdhddhl1chyz66y"))))
42 (build-system gnu-build-system)
43 (arguments
44 ;; Make the modules available under the usual location.
45 '(#:configure-flags (list (string-append "--with-guilemoduledir="
46 (assoc-ref %outputs "out")
47 "/share/guile/site/2.0"))
48
49 #:phases (alist-cons-before
50 'configure 'pre-configure
51 (lambda* (#:key inputs #:allow-other-keys)
52 ;; Make sure the 'skribilo' command gets to see
53 ;; Guile-Reader, even if Guile-Reader is not in the search
54 ;; path.
55 (let ((reader (assoc-ref inputs "guile-reader")))
56 (substitute* "src/skribilo.in"
57 (("^exec (.*) -c" _ things)
58 (string-append "exec " things
59 " -L " reader "/share/guile/site/2.0"
60 " -C " reader "/share/guile/site/2.0"
61 " -c")))))
62 %standard-phases)
63
64 #:parallel-build? #f))
65
66 (native-inputs `(("pkg-config" ,pkg-config)))
67
68 (inputs `(("guile" ,guile-2.0)
69 ("imagemagick" ,imagemagick)
70 ("ghostscript" ,ghostscript) ; for 'convert'
71 ("ploticus" ,ploticus)
72 ("lout" ,lout)))
73
74 ;; The 'skribilo' command needs them, and for people using Skribilo as a
75 ;; library, these inputs are needed as well.
76 (propagated-inputs `(("guile-reader" ,guile2.0-reader)
77 ("guile-lib" ,guile2.0-lib)))
78
79 (home-page "http://www.nongnu.org/skribilo/")
80 (synopsis "Document production tool written in Guile Scheme")
81 (description
82 "Skribilo is a free document production tool that takes a structured
83 document representation as its input and renders that document in a variety of
84 output formats: HTML and Info for on-line browsing, and Lout and LaTeX for
85 high-quality hard copies.
86
87 The input document can use Skribilo's markup language to provide information
88 about the document's structure, which is similar to HTML or LaTeX and does not
89 require expertise. Alternatively, it can use a simpler, “markup-less” format
90 that borrows from Emacs' outline mode and from other conventions used in
91 emails, Usenet and text.
92
93 Lastly, Skribilo provides Guile Scheme APIs.")
94 (license gpl3+)))