GNU bug report logs - #30443
[PATCH] Add colobot

Previous Next

Package: guix-patches;

Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Date: Tue, 13 Feb 2018 01:10:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 30443 in the body.
You can then email your comments to 30443 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#30443; Package guix-patches. (Tue, 13 Feb 2018 01:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 13 Feb 2018 01:10:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add colobot
Date: Tue, 13 Feb 2018 02:08:54 +0100
[Message part 1 (text/plain, inline)]
Hello,

The following patch adds the educational game: Colobot (Gold Edition).

Feedback welcome.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738
[0001-gnu-Add-colobot.patch (text/x-diff, inline)]
From c924704e440118a1aeede1f237b56744967cab66 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Tue, 13 Feb 2018 01:26:27 +0100
Subject: [PATCH] gnu: Add colobot.

* gnu/packages/games.scm (colobot): New variable.
---
 gnu/packages/games.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 85 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 286d0feef..9c3b7cfa8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -32,7 +32,7 @@
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017 Rutger Helling <rhelling <at> mykolab.com>
 ;;; Copyright © 2017 Roel Janssen <roel <at> gnu.org>
-;;; Copyright © 2017 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
+;;; Copyright © 2017, 2018 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5549,3 +5549,87 @@ hacking the gamification of contribution graphs on platforms such as
 Github or Gitlab.")
     (home-page "https://github.com/umayr/badass")
     (license license:expat))))
+
+(define-public colobot
+  (package
+    (name "colobot")
+    (version "0.1.11-alpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/colobot/colobot/archive/"
+                           "colobot-gold-" version ".tar.gz"))
+       (sha256
+        (base32
+         "160rq9fp5vd0qaqr3jvzvzrcxk9cac532y8vx4cvq0a8hgylrbad"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no test
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-data
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((data (assoc-ref inputs "colobot-data")))
+               (invoke "tar" "-xvf" data "-Cdata" "--strip-components=1")
+               #t)))
+         (add-after 'unpack-data 'install-music
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Installation process tries to download music files using
+             ;; "wget" if not already present.  Since we are going to install
+             ;; them, skip "wget" command check.
+             (substitute* "data/music/CMakeLists.txt"
+               (("find_program\\(WGET wget\\)") ""))
+             ;; Effectively install music.
+             (let ((data (assoc-ref inputs "colobot-music")))
+               (invoke "tar" "-xvf" data "-Cdata/music")
+               #t)))
+         (add-after 'install 'fix-install-directory
+           ;; Move binary from "games/" to "bin/".
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (rename-file (string-append out "/games")
+                            (string-append out "/bin"))
+               #t))))))
+    (native-inputs
+     `(("colobot-data"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append
+                 "https://github.com/colobot/colobot-data/archive/"
+                 "colobot-gold-" version ".tar.gz"))
+           (sha256
+            (base32
+             "1pdpsyr41g7xmk03k2g76l214f53ahk04qnkzmsv1fdbbaq7p109"))))
+       ("colobot-music"
+        ,(origin
+           (method url-fetch)
+           ;; Music also exists in FLAC, with a cost of 230Mo.  It can later
+           ;; be converted using "oggenc" for a better sound quality.
+           (uri (string-append "https://colobot.info/files/music/"
+                               "colobot-music_ogg_" version ".tar.gz"))
+           (sha256
+            (base32
+             "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m"))))
+       ("gettext" ,gettext-minimal)
+       ("librsvg" ,librsvg)
+       ("po4a" ,po4a)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("boost" ,boost)
+       ("glew" ,glew)
+       ("libogg" ,libogg)
+       ("libpng" ,libpng)
+       ("libsndfile" ,libsndfile)
+       ("libvorbis" ,libvorbis)
+       ("openal" ,openal)
+       ("physfs" ,physfs)
+       ("sdl2" ,sdl2)
+       ("sdl2-image", sdl2-image)
+       ("sdl2-ttf" ,sdl2-ttf)))
+    (synopsis "Educational programming strategy game")
+    (description "Colobot: Gold Edition is a real-time strategy game, where
+you can program your units (bots) in a language called CBOT, which is similar
+to C++ and Java.  Your mission is to find a new planet to live and survive.
+You can save the humanity and get programming skills!")
+    (home-page "https://colobot.info")
+    (license license:gpl3+)))
-- 
2.16.1


Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Tue, 13 Feb 2018 01:19:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 02:18:42 +0100
> +       ("sdl2" ,sdl2)
> +       ("sdl2-image", sdl2-image)
                      ^^^^^
                 I will fix this typo.




Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Tue, 13 Feb 2018 19:49:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 14:48:28 -0500
[Message part 1 (text/plain, inline)]
On Tue, Feb 13, 2018 at 02:08:54AM +0100, Nicolas Goaziou wrote:
> +           ;; Music also exists in FLAC, with a cost of 230Mo.  It can later
> +           ;; be converted using "oggenc" for a better sound quality.
> +           (uri (string-append "https://colobot.info/files/music/"
> +                               "colobot-music_ogg_" version ".tar.gz"))

I think this comment is mistaken. Audio quality cannot be improved by
transcoding to another format.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Tue, 13 Feb 2018 19:53:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 14:52:47 -0500
[Message part 1 (text/plain, inline)]
On Tue, Feb 13, 2018 at 02:08:54AM +0100, Nicolas Goaziou wrote:
> Subject: [PATCH] gnu: Add colobot.
> 
> * gnu/packages/games.scm (colobot): New variable.

Thanks!

> +       ("sdl2" ,sdl2)
> +       ("sdl2-image", sdl2-image)
> +       ("sdl2-ttf" ,sdl2-ttf)))

I didn't try building or playing the game, but I know that SDL
dependencies often need to be provided in a union using the sdl-union
procedure. So, please make sure this is working :)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Tue, 13 Feb 2018 21:29:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Leo Famulari <leo <at> famulari.name>
Cc: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 22:28:56 +0100
Hello,

Leo Famulari <leo <at> famulari.name> writes:

> On Tue, Feb 13, 2018 at 02:08:54AM +0100, Nicolas Goaziou wrote:
>> +           ;; Music also exists in FLAC, with a cost of 230Mo.  It can later
>> +           ;; be converted using "oggenc" for a better sound quality.
>> +           (uri (string-append "https://colobot.info/files/music/"
>> +                               "colobot-music_ogg_" version ".tar.gz"))
>
> I think this comment is mistaken. Audio quality cannot be improved by
> transcoding to another format.

This is not what I meant. 

The game expects ogg files for its music. The package provides default
ogg files, of medium quality. If you want better audio quality, you can
download (lossless?) FLAC files instead and convert them to ogg files
with a better quality (and a lesser compression).

If this comment is confusing, I can remove it. I guess one doesn't play
this game for sound quality (even though some scores are nice).

WDYT?

Regards,

-- 
Nicolas Goaziou                                                0x80A93738




Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Tue, 13 Feb 2018 22:06:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Leo Famulari <leo <at> famulari.name>
Cc: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 23:05:07 +0100
Hello,

Leo Famulari <leo <at> famulari.name> writes:

> On Tue, Feb 13, 2018 at 02:08:54AM +0100, Nicolas Goaziou wrote:
>> Subject: [PATCH] gnu: Add colobot.
>> 
>> * gnu/packages/games.scm (colobot): New variable.
>
> Thanks!
>
>> +       ("sdl2" ,sdl2)
>> +       ("sdl2-image", sdl2-image)
>> +       ("sdl2-ttf" ,sdl2-ttf)))
>
> I didn't try building or playing the game, but I know that SDL
> dependencies often need to be provided in a union using the sdl-union
> procedure. So, please make sure this is working :)

The game builds and is playable with the current patch. I tested it with

  guix environment --pure --ad-hoc colobot -- colobot

It also builds and is playable with sdl-union.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738




Information forwarded to guix-patches <at> gnu.org:
bug#30443; Package guix-patches. (Wed, 14 Feb 2018 02:59:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 30443 <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 21:58:54 -0500
[Message part 1 (text/plain, inline)]
On Tue, Feb 13, 2018 at 10:28:56PM +0100, Nicolas Goaziou wrote:
> >> +           ;; Music also exists in FLAC, with a cost of 230Mo.  It can later
> >> +           ;; be converted using "oggenc" for a better sound quality.
> >> +           (uri (string-append "https://colobot.info/files/music/"
> >> +                               "colobot-music_ogg_" version ".tar.gz"))
> >
> > I think this comment is mistaken. Audio quality cannot be improved by
> > transcoding to another format.
> 
> This is not what I meant. 
> 
> The game expects ogg files for its music. The package provides default
> ogg files, of medium quality. If you want better audio quality, you can
> download (lossless?) FLAC files instead and convert them to ogg files
> with a better quality (and a lesser compression).
> 
> If this comment is confusing, I can remove it. I guess one doesn't play
> this game for sound quality (even though some scores are nice).

The comment is confusing, but your reply to my question is not :)

So, I recommend either rewriting the comment or leaving it out.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Fri, 16 Feb 2018 20:01:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Fri, 16 Feb 2018 20:01:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Leo Famulari <leo <at> famulari.name>
Cc: 30443-done <at> debbugs.gnu.org
Subject: Re: [bug#30443] [PATCH] Add colobot
Date: Fri, 16 Feb 2018 21:00:39 +0100
Hello,

Leo Famulari <leo <at> famulari.name> writes:

> The comment is confusing, but your reply to my question is not :)
>
> So, I recommend either rewriting the comment or leaving it out.

I eventually left it out. I also used `sdl-union', just to be on the
safe side.

Thank you for the review.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Mar 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 174 days ago.

Previous Next


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