Subject: bug#53206: closed (Re: [bug#53206] [PATCH] gnu: info-reader: Reference gzip by absolute path.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Jan 2022 21:25:02 +0000

Your bug report

#53206: [PATCH] gnu: info-reader: Reference gzip by absolute path.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
53206: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53206
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#53206] [PATCH] gnu: info-reader: Reference gzip by absolute path.
From: Nicolas Goaziou <[email-masked]>
To: Maxime Devos <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Jan 2022 22:23:52 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Maxime Devos <[email-masked]> writes:

> 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'.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou

Subject: [PATCH] gnu: info-reader: Reference gzip by absolute path.
From: Maxime Devos <[email-masked]>
To: [email-masked]
Cc: Maxime Devos <[email-masked]>
Date: Wed, 12 Jan 2022 12:08:34 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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 <[email-masked]>
 ;;; Copyright © 2020 Nicolas Goaziou <[email-masked]>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email-masked]>
+;;; Copyright © 2021 Maxime Devos <[email-masked]>
 ;;;
 ;;; 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