gnu: Separate Python core packages from the rest.
[jackhill/guix/guix.git] / gnu / packages / noweb.scm
CommitLineData
6d73e17b
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 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 noweb)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix licenses))
24
25(define-public noweb
26 (package
27 (name "noweb")
28 (version "2.11b")
29 (source (origin
30 (method url-fetch)
31 (uri (string-append "ftp://www.eecs.harvard.edu/pub/nr/noweb-"
32 version ".tgz"))
33 (sha256
34 (base32
35 "10hdd6mrk26kyh4bnng4ah5h1pnanhsrhqa7qwqy6dyv3rng44y9"))))
36 (build-system gnu-build-system)
37 (arguments
dc1d3cde
KK
38 '(#:phases
39 (modify-phases %standard-phases
40 (add-before 'install 'pre-install
41 (lambda* (#:key outputs #:allow-other-keys)
42 (let ((out (assoc-ref outputs "out")))
43 (mkdir-p (string-append out "/share/texmf/tex/latex"))
44 #t)))
45 (add-after 'install 'post-install
46 (lambda* (#:key outputs inputs #:allow-other-keys)
47 (let ((out (assoc-ref outputs "out"))
48 (cu (assoc-ref inputs "coreutils"))
49 (du (assoc-ref inputs "diffutils")))
50 (with-directory-excursion out
51 (for-each (lambda (prog)
52 (substitute* prog
53 (("nawk") (which "awk"))))
54 (append (map (lambda (x)
55 (string-append "bin/" x))
56 '("noweb" "nountangle"
57 "noroots" "noroff"
58 "noindex"))
59 (map (lambda (x)
60 (string-append "lib/" x))
61 '("btdefn" "emptydefn" "noidx"
62 "pipedocs" "toascii" "tohtml"
63 "toroff" "totex" "unmarkup"))))
64 (substitute* "bin/cpif"
65 (("^PATH=.*$")
66 (string-append "PATH=" cu "/bin:" du "/bin\n"))))
67 #t)))
68 (replace 'configure
69 (lambda _
70 ;; Jump in the source.
71 (chdir "src")
6d73e17b 72
dc1d3cde
KK
73 ;; The makefile reads "source: FAQ", but FAQ isn't
74 ;; available.
75 (substitute* "Makefile"
76 (("FAQ") ""))
77 #t)))
6d73e17b
LC
78 #:make-flags (let ((out (assoc-ref %outputs "out")))
79 (list (string-append "BIN=" out "/bin")
80 (string-append "LIB=" out "/lib")
81 (string-append "MAN=" out "/share/man")
82 (string-append "TEXINPUTS=" out
83 "/share/texmf/tex/latex")))
84 #:tests? #f)) ; no tests
85 (home-page "http://www.cs.tufts.edu/~nr/noweb/")
86 (synopsis "Literate programming tool")
87 (description
35b9e423 88 "Noweb is designed to meet the needs of literate programmers while
6d73e17b
LC
89remaining as simple as possible. Its primary advantages are simplicity,
90extensibility, and language-independence—especially noticeable when compared
91with other literate-programming tools. noweb uses 5 control sequences to
92WEB's 27. The noweb manual is only 4 pages; an additional page explains how
93to customize its LaTeX output. noweb works “out of the box” with any
94programming language, and supports TeX, LaTeX, HTML, and troff back ends.")
95 (license (fsf-free "http://www.cs.tufts.edu/~nr/noweb/#copyright"))))