unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#53206] [PATCH] gnu: info-reader: Reference gzip by absolute path.
@ 2022-01-12 12:08 Maxime Devos
  2022-01-12 21:23 ` bug#53206: " Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Devos @ 2022-01-12 12:08 UTC (permalink / raw)
  To: 53206; +Cc: Maxime Devos

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'.
---
 gnu/packages/texinfo.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

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 <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; 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

base-commit: 9fd4f4b09cc0495d6b1418f171ff738a1086cc00
prerequisite-patch-id: 9e070819096a5b3df220706866de3f9a24700add
prerequisite-patch-id: 9e081caf6df1e9b7fa4ecf0e816089cb65897d7b
prerequisite-patch-id: 8fa14cb2d1fcc4b4d5be227bf8a2691a912500c0
prerequisite-patch-id: 3d4bf2cbd36e29a031c6ccd13fdf4edd51b67652
prerequisite-patch-id: b740911b2fab6e87f003e13ce21d3c726d7ffeb6
prerequisite-patch-id: 2495e12d0efbf42fe847e7411a9c7abbf6b09c38
prerequisite-patch-id: f281231d96059179b6b891d999dda798b099e2fb
prerequisite-patch-id: c60b330f96721da1f7790dd29b5d428e312e7b2e
prerequisite-patch-id: a3ab55eaf0dece586c513fa5671414ff902eb1cd
prerequisite-patch-id: ff47ed0086837f18293d67e5edd01ca14c6f84c9
prerequisite-patch-id: 2c805f40c37fed3eb8e69456d4c90c0a75b643be
prerequisite-patch-id: dfc9534307fd4365205bcd22cea57c3e196b29e8
prerequisite-patch-id: 5035d75f6463dbcc8d7e29782ba9b1f7a5867c42
prerequisite-patch-id: 25bcba14a4fe703d4e09169e2741526781ae3372
-- 
2.30.2





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-12 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 12:08 [bug#53206] [PATCH] gnu: info-reader: Reference gzip by absolute path Maxime Devos
2022-01-12 21:23 ` bug#53206: " Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).