summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Rohleder <mike@rohleder.de>2021-05-04 01:07:28 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-05 16:56:43 +0200
commit561db254a5fd72578ea2a0b0a3e8303f0ef20d85 (patch)
treedafe66d363972a0e8c1c69f50e546b5133c6fec8
parentd87a0efeeb6299faf97ade0b70efac00bbef023c (diff)
downloadguix-561db254a5fd72578ea2a0b0a3e8303f0ef20d85.tar.gz
gnu: xboard: Set default engine to gnuchess.
Fixes <https://issues.guix.gnu.org/45236>.

* gnu/packages/games.scm (xboard): Set default engine to gnuchess.
[arguments]: Add phase 'patch-default-engine.
[inputs]: Add chess.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/games.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 9d7c8ef341..6a9e21b422 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3342,10 +3342,18 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "xboard.conf"
                (("aplay -q")
-                (string-append (assoc-ref inputs "alsa-utils") "/bin/aplay -q")))
-             #t)))))
+                (string-append (assoc-ref inputs "alsa-utils") "/bin/aplay -q")))))
+         ;; Fixes https://issues.guix.gnu.org/45236.
+         (add-after 'unpack 'patch-default-engine
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "xboard.conf"
+               (("-firstChessProgram fairymax")
+                (string-append "-firstChessProgram "
+                               (assoc-ref inputs "chess")
+                               "/bin/gnuchessx"))))))))
     (inputs
      `(("alsa-utils" ,alsa-utils)
+       ("chess" ,chess)
        ("gtk+" ,gtk+-2)
        ("librsvg" ,librsvg)))
     (native-inputs