gnu: xterm: Fix uxterm in pure environments.
authorTobias Geerinckx-Rice <me@tobias.gr>
Sun, 14 Mar 2021 11:42:44 +0000 (12:42 +0100)
committerTobias Geerinckx-Rice <me@tobias.gr>
Mon, 15 Mar 2021 19:31:24 +0000 (20:31 +0100)
* gnu/packages/xorg.scm (xterm)[arguments]: Add a 'patch-file-names
phase.

gnu/packages/xorg.scm

index 28ee64b..0aa4411 100644 (file)
@@ -6087,7 +6087,19 @@ to answer a question.  Xmessage can also exit after a specified time.")
      '(#:configure-flags '("--enable-wide-chars" "--enable-load-vt-fonts"
                            "--enable-i18n" "--enable-doublechars"
                            "--enable-luit" "--enable-mini-luit")
-       #:tests? #f))
+       #:tests? #f                      ; no test suite
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'patch-file-names
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "uxterm"
+                 (("([ `\\|])(sh|sed|awk|xmessage) " _ prefix command)
+                  (string-append prefix (which command) " "))
+                 (("(`|\"|LANG=C )(locale) " _ prefix command)
+                  (string-append prefix (which command) " "))
+                 (("=xterm")
+                  (string-append "=" out "/bin/xterm")))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs