diff mbox series

[bug#48207] gnu: chess: Fix paths in installed shell scripts.

Message ID 20210503215615.30236-1-mike@rohleder.de
State Accepted
Headers show
Series [bug#48207] gnu: chess: Fix paths in installed shell scripts. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Michael Rohleder May 3, 2021, 9:56 p.m. UTC
* gnu/packages/games.scm (chess)[arguments]: Add a 'fix-shell-scripts phase.
---
 gnu/packages/games.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Nicolas Goaziou May 3, 2021, 11:02 p.m. UTC | #1
Hello,

Michael Rohleder <mike@rohleder.de> writes:

> * gnu/packages/games.scm (chess)[arguments]: Add a 'fix-shell-scripts
> phase.

Applied. Thank you.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 073e41eec6..9d7c8ef341 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3163,6 +3163,16 @@  asynchronously and at a user-defined speed.")
         (base32
          "0ilq4bfl0lwyzf11q7n2skydjhalfn3bgxhrp5hjxs5bc5d6fdp5"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'fix-shell-scripts
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (chdir bin)
+               (substitute* '("gnuchessx" "gnuchessu")
+                 (("^gnuchess") (string-append bin "/gnuchess")))))))))
     (home-page "https://www.gnu.org/software/chess/")
     (synopsis "Full chess implementation")
     (description "GNU Chess is a chess engine.  It allows you to compete