diff options
| -rw-r--r-- | gnu-system.am | 1 | ||||
| -rw-r--r-- | gnu/packages/noweb.scm | 96 |
2 files changed, 97 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index 9e71b80a23f..37072957cee 100644 --- a/gnu-system.am +++ b/gnu-system.am | |||
| @@ -118,6 +118,7 @@ GNU_SYSTEM_MODULES = \ | |||
| 118 | gnu/packages/ncurses.scm \ | 118 | gnu/packages/ncurses.scm \ |
| 119 | gnu/packages/netpbm.scm \ | 119 | gnu/packages/netpbm.scm \ |
| 120 | gnu/packages/nettle.scm \ | 120 | gnu/packages/nettle.scm \ |
| 121 | gnu/packages/noweb.scm \ | ||
| 121 | gnu/packages/ocaml.scm \ | 122 | gnu/packages/ocaml.scm \ |
| 122 | gnu/packages/oggvorbis.scm \ | 123 | gnu/packages/oggvorbis.scm \ |
| 123 | gnu/packages/openldap.scm \ | 124 | gnu/packages/openldap.scm \ |
diff --git a/gnu/packages/noweb.scm b/gnu/packages/noweb.scm new file mode 100644 index 00000000000..155639f57e6 --- /dev/null +++ b/gnu/packages/noweb.scm | |||
| @@ -0,0 +1,96 @@ | |||
| 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 | ||
| 38 | '(#:phases (alist-cons-before | ||
| 39 | 'install 'pre-install | ||
| 40 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 41 | (let ((out (assoc-ref outputs "out"))) | ||
| 42 | (mkdir-p (string-append out "/share/texmf/tex/latex")) | ||
| 43 | #t)) | ||
| 44 | (alist-cons-after | ||
| 45 | '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 | (alist-replace | ||
| 69 | 'configure | ||
| 70 | (lambda _ | ||
| 71 | ;; Jump in the source. | ||
| 72 | (chdir "src") | ||
| 73 | |||
| 74 | ;; The makefile reads "source: FAQ", but FAQ isn't | ||
| 75 | ;; available. | ||
| 76 | (substitute* "Makefile" | ||
| 77 | (("FAQ") ""))) | ||
| 78 | %standard-phases))) | ||
| 79 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | ||
| 80 | (list (string-append "BIN=" out "/bin") | ||
| 81 | (string-append "LIB=" out "/lib") | ||
| 82 | (string-append "MAN=" out "/share/man") | ||
| 83 | (string-append "TEXINPUTS=" out | ||
| 84 | "/share/texmf/tex/latex"))) | ||
| 85 | #:tests? #f)) ; no tests | ||
| 86 | (home-page "http://www.cs.tufts.edu/~nr/noweb/") | ||
| 87 | (synopsis "Literate programming tool") | ||
| 88 | (description | ||
| 89 | "noweb is designed to meet the needs of literate programmers while | ||
| 90 | remaining as simple as possible. Its primary advantages are simplicity, | ||
| 91 | extensibility, and language-independence—especially noticeable when compared | ||
| 92 | with other literate-programming tools. noweb uses 5 control sequences to | ||
| 93 | WEB's 27. The noweb manual is only 4 pages; an additional page explains how | ||
| 94 | to customize its LaTeX output. noweb works “out of the box” with any | ||
| 95 | programming language, and supports TeX, LaTeX, HTML, and troff back ends.") | ||
| 96 | (license (fsf-free "http://www.cs.tufts.edu/~nr/noweb/#copyright")))) | ||
