You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
4.6 KiB

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