From c4b3f9421ec5e4457e87c6c09912cf07381047da Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Wed, 12 Jan 2022 12:08:34 +0000 Subject: gnu: info-reader: Reference gzip by absolute path. This allows doing "guix shell --pure info-reader guile -- info guile". * gnu/packages/texinfo.scm (info-reader)[arguments]: Add 'absolute-binary-path' phase to refer to gzip by the absolute store file name. [inputs]: Add 'gzip'. Signed-off-by: Nicolas Goaziou --- gnu/packages/texinfo.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 13fb92d14a..fc1dac9df9 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2019, 2020 Mathieu Othacehe ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -156,6 +157,17 @@ is on expressing the content semantically, avoiding physical markup commands.") `(,@(substitute-keyword-arguments (package-arguments texinfo) ((#:phases phases) `(modify-phases ,phases + ;; Make sure 'info-reader' can read compressed info files + ;; in a pure environment. There are also a few other + ;; uncompressors listed in this file (lzip, unxz, bunzip2, ...) + ;; but let's not include them because info manuals in Guix + ;; are always compressed with 'gzip'. + ;; TODO(core-updates): maybe move to the 'texinfo' package. + (add-after 'unpack 'absolute-binary-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "info/filesys.c" + (("gunzip") (search-input-file inputs "/bin/gunzip")) + (("gzip") (search-input-file inputs "/bin/gzip"))))) (add-after 'install 'keep-only-info-reader (lambda* (#:key outputs #:allow-other-keys) ;; Remove everything but 'bin/info' and associated @@ -179,7 +191,9 @@ is on expressing the content semantically, avoiding physical markup commands.") "perl") #:modules ((ice-9 ftw) (srfi srfi-1) ,@%gnu-build-system-modules))) - (synopsis "Standalone Info documentation reader"))) + (synopsis "Standalone Info documentation reader") + (inputs (modify-inputs (package-inputs texinfo) + (prepend gzip))))) (define-public texi2html (package -- cgit 1.4.1