From 05f5ce0c39fc69dc7b230aeceb257e6a9535b1a7 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Sun, 10 Jan 2016 10:41:23 +0100 Subject: gnu: sbcl: Generate and install documentation. * gnu/packages/lisp.scm (sbcl): Add 'doc' output. [arguments]: Add 'build-doc' and 'install-doc' phases. [native-inputs]: Add 'texlive' and 'texinfo'. --- gnu/packages/lisp.scm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'gnu/packages/lisp.scm') diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index ba2e303847..e64fd4933f 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 John Darrington ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2016 Federico Beffa ;;; ;;; This file is part of GNU Guix. ;;; @@ -215,12 +216,15 @@ an interpreter, a compiler, a debugger, and much more.") (sha256 (base32 "0ab9lw056yf6y0rjmx3iirn5n59pmssqxf00fbmpyl6qsnpaja1d")))) (build-system gnu-build-system) + (outputs '("out" "doc")) ;; Bootstrap with CLISP. (native-inputs `(("clisp" ,clisp) ("which" ,which) ("inetutils" ,inetutils) ;for hostname(1) - ("ed" ,ed))) + ("ed" ,ed) + ("texlive" ,texlive) + ("texinfo" ,texinfo))) (arguments '(#:phases (modify-phases %standard-phases @@ -275,7 +279,24 @@ an interpreter, a compiler, a debugger, and much more.") (assoc-ref outputs "out")))))) (replace 'install (lambda _ - (zero? (system* "sh" "install.sh"))))) + (zero? (system* "sh" "install.sh")))) + (add-after 'build 'build-doc + (lambda _ + (with-directory-excursion "doc/manual" + (and (zero? (system* "make" "info")) + (zero? (system* "make" "dist")))))) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc")) + (old-doc-dir (string-append out "/share/doc")) + (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl"))) + (rmdir (string-append old-doc-dir "/sbcl/html")) + (mkdir-p new-doc/sbcl-dir) + (copy-recursively (string-append old-doc-dir "/sbcl") + new-doc/sbcl-dir) + (delete-file-recursively old-doc-dir) + #t)))) ;; No 'check' target, though "make.sh" (build phase) runs tests. #:tests? #f)) (home-page "http://www.sbcl.org/") -- cgit v1.2.3