From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 30443@debbugs.gnu.org
Subject: [bug#30443] [PATCH] Add colobot
Date: Tue, 13 Feb 2018 02:08:54 +0100 [thread overview]
Message-ID: <873725vgpl.fsf@nicolasgoaziou.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 187 bytes --]
Hello,
The following patch adds the educational game: Colobot (Gold Edition).
Feedback welcome.
Regards,
--
Nicolas Goaziou 0x80A93738
[-- Attachment #2: Add Colobot --]
[-- Type: text/x-diff, Size: 4689 bytes --]
From c924704e440118a1aeede1f237b56744967cab66 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@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@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@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
next reply other threads:[~2018-02-13 1:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 1:08 Nicolas Goaziou [this message]
2018-02-13 1:18 ` [bug#30443] [PATCH] Add colobot Nicolas Goaziou
2018-02-13 19:48 ` Leo Famulari
2018-02-13 21:28 ` Nicolas Goaziou
2018-02-14 2:58 ` Leo Famulari
2018-02-16 20:00 ` bug#30443: " Nicolas Goaziou
2018-02-13 19:52 ` [bug#30443] " Leo Famulari
2018-02-13 22:05 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873725vgpl.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=30443@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.