diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-24 22:19:44 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-24 22:47:15 +0100 |
commit | 7feebd33aec8a456debf55373e291fe3d9128945 (patch) | |
tree | e6a933c8060a039d6b6aac2c9a4466cd2a305c71 /gnu/packages/texinfo.scm | |
parent | 0feefb530fff23ae038cac8d2a719b59db10c400 (diff) |
gnu: Add 'info-reader'.
* gnu/packages/texinfo.scm (info-reader): New variable.
Diffstat (limited to 'gnu/packages/texinfo.scm')
-rw-r--r-- | gnu/packages/texinfo.scm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 5c1204ed2e..8f5913ac89 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -101,6 +101,41 @@ is on expressing the content semantically, avoiding physical markup commands.") (native-inputs '()) (inputs `(("ncurses" ,ncurses) ("xz" ,xz))))) +(define-public info-reader + ;; The idea of this package is to have the standalone Info reader without + ;; the dependency on Perl that 'makeinfo' drags. + (package + (inherit texinfo-6.1) + (name "info-reader") + (arguments + `(#:disallowed-references ,(assoc-ref (package-inputs texinfo-6.1) + "perl") + + #:modules ((ice-9 ftw) (srfi srfi-1) + ,@%gnu-build-system-modules) + + #:phases (modify-phases %standard-phases + (add-after 'install 'keep-only-info-reader + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove everything but 'bin/info' and associated + ;; files. + (define (files) + (scandir "." (lambda (file) + (not (member file '("." "..")))))) + + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion out + (for-each delete-file-recursively + (fold delete (files) '("bin" "share")))) + (with-directory-excursion (string-append out "/bin") + (for-each delete-file (delete "info" (files)))) + (with-directory-excursion (string-append out "/share") + (for-each delete-file-recursively + (fold delete (files) + '("info" "locale")))) + #t)))))) + (synopsis "Standalone Info documentation reader"))) + (define-public texi2html (package (name "texi2html") |