GNU bug report logs - #53623
[PATCH] gnu: mosh: Fix path to binaries.

Previous Next

Package: guix-patches;

Reported by: Michael Rohleder <mike <at> rohleder.de>

Date: Sat, 29 Jan 2022 14:31:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Rohleder <mike <at> rohleder.de>
To: guix-patches <at> gnu.org
Cc: Michael Rohleder <mike <at> rohleder.de>
Subject: [PATCH] gnu: mosh: Fix path to binaries.
Date: Sat, 29 Jan 2022 15:29:50 +0100
* gnu/packages/ssh.scm (mosh)[arguments]: Add substitution for mosh-server and
-client. Remove unneeded 'wrap phase.
---
For some reason setting $PATH in 'wrap phase doesn't work anymore, the perl
script doesn't find it's binaries, so I substitute them there.

 gnu/packages/ssh.scm | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 4dd8bb6d96..c296029fc0 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
+;;; Copyright © 2022 Michael Rohleder <mike <at> rohleder.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -478,19 +479,15 @@ (define-public mosh
      '(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-FHS-file-names
-           (lambda _
-             (substitute* "scripts/mosh.pl"
-               (("/bin/sh")
-                (which "sh")))
-             #t))
-         (add-after 'install 'wrap
            (lambda* (#:key outputs #:allow-other-keys)
-             ;; Make sure 'mosh' can find 'mosh-client' and
-             ;; 'mosh-server'.
              (let* ((out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin")))
-               (wrap-program (string-append bin "/mosh")
-                             `("PATH" ":" prefix (,bin)))))))))
+               (substitute* "scripts/mosh.pl"
+                 (("/bin/sh") (which "sh"))
+                 (("\\$server = 'mosh-server'")
+                  (string-append "$server = '" bin "/mosh-server'"))
+                 (("\\$client = 'mosh-client'")
+                  (string-append "$client = '" bin "/mosh-client'")))))))))
     (native-inputs
      (list pkg-config))
     (inputs
-- 
2.34.0





This bug report was last modified 3 years and 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.