aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/texinfo.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-04-06 12:00:29 +0200
committerLudovic Courtès <ludo@gnu.org>2016-04-06 12:00:29 +0200
commit933d2fe4cfb380f66af631a2203ec23c367e5b1a (patch)
treef10581ed0da1911eed9b02e69d999ba481d9d3c6 /gnu/packages/texinfo.scm
parentf8835ff4b3dd59d59bf44838d05d3d60114d15d2 (diff)
parent998afc3608242b75051f43ece36d52474c51e285 (diff)
downloadguix-933d2fe4cfb380f66af631a2203ec23c367e5b1a.tar
guix-933d2fe4cfb380f66af631a2203ec23c367e5b1a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/texinfo.scm')
-rw-r--r--gnu/packages/texinfo.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 8b9ed00de7..51497030c2 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -89,6 +89,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")