[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: gnu: Add 'info-reader'.
From: |
Ludovic Courtès |
Subject: |
05/07: gnu: Add 'info-reader'. |
Date: |
Thu, 24 Mar 2016 21:47:46 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 7feebd33aec8a456debf55373e291fe3d9128945
Author: Ludovic Courtès <address@hidden>
Date: Thu Mar 24 22:19:44 2016 +0100
gnu: Add 'info-reader'.
* gnu/packages/texinfo.scm (info-reader): New variable.
---
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 5c1204e..8f5913a 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")
- branch master updated (229b366 -> 68abb9b), Ludovic Courtès, 2016/03/24
- 03/07: activation: Copy account skeletons silently., Ludovic Courtès, 2016/03/24
- 02/07: install: Add /tmp as a tmpfs., Ludovic Courtès, 2016/03/24
- 06/07: system: Use 'info-reader' instead of Texinfo to avoid dragging Perl., Ludovic Courtès, 2016/03/24
- 05/07: gnu: Add 'info-reader'.,
Ludovic Courtès <=
- 04/07: install: Remove cgroup and elogind file systems., Ludovic Courtès, 2016/03/24
- 07/07: install: Use 'info-reader' instead of Texinfo 4., Ludovic Courtès, 2016/03/24
- 01/07: services: nscd: Make respawnable., Ludovic Courtès, 2016/03/24