GNU bug report logs - #40364
[PATCH] gnu: Add gnome-chess

Previous Next

Package: guix-patches;

Reported by: Jack Hill <jackhill <at> jackhill.us>

Date: Wed, 1 Apr 2020 04:02:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40364 in the body.
You can then email your comments to 40364 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40364; Package guix-patches. (Wed, 01 Apr 2020 04:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jack Hill <jackhill <at> jackhill.us>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 01 Apr 2020 04:02:02 GMT) Full text and rfc822 format available.

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

From: Jack Hill <jackhill <at> jackhill.us>
To: guix-patches <at> gnu.org
Cc: Jack Hill <jackhill <at> jackhill.us>
Subject: [PATCH] gnu: Add gnome-chess
Date: Wed,  1 Apr 2020 00:00:53 -0400
* gnu/packages/games.scm (gnome-chess): New variable.
---
 gnu/packages/games.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e818b851f4..dbc9e899b8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix <at> posteo.mx>
 ;;; Copyright © 2020 Naga Malleswari <nagamalli <at> riseup.net>
 ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
+;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1095,6 +1096,45 @@ destroying an ancient book using a special wand.")
     ;; license.  The whole package is released under GPLv3+.
     (license license:gpl3+)))
 
+(define-public gnome-chess
+  (package
+    (name "gnome-chess")
+    (version "3.36.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1a9fgi749gy1f60vbcyrqqkab9vqs42hji70q73k1xx8rv0agmg0"))))
+    (build-system meson-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'skip-gtk-update-icon-cache
+           ;; Don't create 'icon-theme.cache'.
+           (lambda _
+             (substitute* "meson_post_install.py"
+               (("gtk-update-icon-cache") "true"))
+             #t)))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("librsvg" ,librsvg)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin") ; for desktop-file-validate and appstream-util
+       ("itstool" ,itstool)
+       ("pkg-config" ,pkg-config)
+       ("vala" ,vala)))
+    (home-page "https://wiki.gnome.org/Apps/Chess")
+    (synopsis "Chess board for GNOME")
+    (description "GNOME Chess provides a 2D board for playing chess games
+against human or computer players.  It supports loading and saving games in
+Portable Game Notation.  To play against a computer, install a chess engine
+such as chess or stockfish.")
+    (license license:gpl3+)))
+
 (define-public gnubg
   (package
     (name "gnubg")
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#40364; Package guix-patches. (Wed, 01 Apr 2020 07:37:01 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 40364 <at> debbugs.gnu.org, Jack Hill <jackhill <at> jackhill.us>
Subject: Re: [bug#40364] [PATCH] gnu: Add gnome-chess
Date: Wed, 01 Apr 2020 08:36:12 +0100
[Message part 1 (text/plain, inline)]
Jack Hill <jackhill <at> jackhill.us> writes:

> * gnu/packages/games.scm (gnome-chess): New variable.
> ---
>  gnu/packages/games.scm | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)

Thanks for the patch Jack!

> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index e818b851f4..dbc9e899b8 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -49,6 +49,7 @@
>  ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix <at> posteo.mx>
>  ;;; Copyright © 2020 Naga Malleswari <nagamalli <at> riseup.net>
>  ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
> +;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1095,6 +1096,45 @@ destroying an ancient book using a special wand.")
>      ;; license.  The whole package is released under GPLv3+.
>      (license license:gpl3+)))
>
> +(define-public gnome-chess
> +  (package
> +    (name "gnome-chess")
> +    (version "3.36.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "mirror://gnome/sources/" name "/"
> +                                  (version-major+minor version)  "/"
> +                                  name "-" version ".tar.xz"))
> +              (sha256
> +               (base32
> +                "1a9fgi749gy1f60vbcyrqqkab9vqs42hji70q73k1xx8rv0agmg0"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'skip-gtk-update-icon-cache
> +           ;; Don't create 'icon-theme.cache'.
> +           (lambda _
> +             (substitute* "meson_post_install.py"
> +               (("gtk-update-icon-cache") "true"))
> +             #t))))

It would be good to wrap gnome-chess to include it's own share directory
in the XDG_DATA_DIRS environment variable. Without that, I can't just
run it [1], but when I set that variable correctly [2], it works :)

1:
→ /gnu/store/jv8jpq23iic13j7zdl8mdc30vcv508wh-gnome-chess-3.36.0/bin/gnome-chess

(gnome-chess:10039): GLib-GIO-ERROR **: 08:31:52.482: Settings schema 'org.gnome.Chess' is not installed
Trace/breakpoint trap

2:
→ XDG_DATA_DIRS="$XDG_DATA_DIRS:/gnu/store/jv8jpq23iic13j7zdl8mdc30vcv508wh-gnome-chess-3.36.0/share" /gnu/store/jv8jpq23iic13j7zdl8mdc30vcv508wh-gnome-chess-3.36.0/bin/gnome-chess


This wrapping is something that would automatically be done through the
glib-or-gtk-build-system, but maybe not automatically through the meson
build system.

> +    (inputs
> +     `(("gtk+" ,gtk+)
> +       ("librsvg" ,librsvg)))
> +    (native-inputs
> +     `(("gettext" ,gettext-minimal)
> +       ("glib:bin" ,glib "bin") ; for desktop-file-validate and appstream-util
> +       ("itstool" ,itstool)
> +       ("pkg-config" ,pkg-config)
> +       ("vala" ,vala)))
> +    (home-page "https://wiki.gnome.org/Apps/Chess")
> +    (synopsis "Chess board for GNOME")
> +    (description "GNOME Chess provides a 2D board for playing chess games
> +against human or computer players.  It supports loading and saving games in
> +Portable Game Notation.  To play against a computer, install a chess engine
> +such as chess or stockfish.")
> +    (license license:gpl3+)))
> +
>  (define-public gnubg
>    (package
>      (name "gnubg")

Apart from the wrapping I mentioned above, this looks good to me :)

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40364; Package guix-patches. (Wed, 01 Apr 2020 08:28:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 40364 <at> debbugs.gnu.org, Jack Hill <jackhill <at> jackhill.us>
Subject: Re: [bug#40364] [PATCH] gnu: Add gnome-chess
Date: Wed, 01 Apr 2020 10:27:49 +0200
Hello,

Christopher Baines <mail <at> cbaines.net> writes:

> This wrapping is something that would automatically be done through the
> glib-or-gtk-build-system, but maybe not automatically through the meson
> build system.

I think the meson build system has a #:glib-or-gtk? parameter to do
that.

Regards,

-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#40364; Package guix-patches. (Wed, 01 Apr 2020 14:33:02 GMT) Full text and rfc822 format available.

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

From: Jack Hill <jackhill <at> jackhill.us>
To: 40364 <at> debbugs.gnu.org
Cc: Jack Hill <jackhill <at> jackhill.us>, mail <at> cbaines.net, mail <at> nicolasgoaziou.fr
Subject: [PATCH v2] gnu: Add gnome-chess
Date: Wed,  1 Apr 2020 10:32:07 -0400
* gnu/packages/games.scm (gnome-chess): New variable.
---

Thanks for the review and suggestion. I've added the #glib-or-gtk? #t
argument, and it looks like the wrapping happens correctly.

 gnu/packages/games.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e818b851f4..8a24dad33d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix <at> posteo.mx>
 ;;; Copyright © 2020 Naga Malleswari <nagamalli <at> riseup.net>
 ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
+;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1095,6 +1096,46 @@ destroying an ancient book using a special wand.")
     ;; license.  The whole package is released under GPLv3+.
     (license license:gpl3+)))
 
+(define-public gnome-chess
+  (package
+    (name "gnome-chess")
+    (version "3.36.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version)  "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1a9fgi749gy1f60vbcyrqqkab9vqs42hji70q73k1xx8rv0agmg0"))))
+    (build-system meson-build-system)
+    (arguments
+     '(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'skip-gtk-update-icon-cache
+           ;; Don't create 'icon-theme.cache'.
+           (lambda _
+             (substitute* "meson_post_install.py"
+               (("gtk-update-icon-cache") "true"))
+             #t)))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("librsvg" ,librsvg)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin") ; for desktop-file-validate and appstream-util
+       ("itstool" ,itstool)
+       ("pkg-config" ,pkg-config)
+       ("vala" ,vala)))
+    (home-page "https://wiki.gnome.org/Apps/Chess")
+    (synopsis "Chess board for GNOME")
+    (description "GNOME Chess provides a 2D board for playing chess games
+against human or computer players.  It supports loading and saving games in
+Portable Game Notation.  To play against a computer, install a chess engine
+such as chess or stockfish.")
+    (license license:gpl3+)))
+
 (define-public gnubg
   (package
     (name "gnubg")
-- 
2.25.1





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Wed, 01 Apr 2020 17:31:02 GMT) Full text and rfc822 format available.

Notification sent to Jack Hill <jackhill <at> jackhill.us>:
bug acknowledged by developer. (Wed, 01 Apr 2020 17:31:02 GMT) Full text and rfc822 format available.

Message #19 received at 40364-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Jack Hill <jackhill <at> jackhill.us>
Cc: 40364-done <at> debbugs.gnu.org, mail <at> nicolasgoaziou.fr
Subject: Re: [PATCH v2] gnu: Add gnome-chess
Date: Wed, 01 Apr 2020 18:30:24 +0100
[Message part 1 (text/plain, inline)]
Jack Hill <jackhill <at> jackhill.us> writes:

> * gnu/packages/games.scm (gnome-chess): New variable.
> ---
>
> Thanks for the review and suggestion. I've added the #glib-or-gtk? #t
> argument, and it looks like the wrapping happens correctly.

Great, I've pushed this as 63406c0bfd0d016098ef593dcc8bfc412df36bea.

Thanks for the patch!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Apr 2020 11:24:06 GMT) Full text and rfc822 format available.

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

Previous Next


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