From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elP6j-0004J9-R8 for guix-patches@gnu.org; Mon, 12 Feb 2018 20:10:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elP6g-0001BW-0p for guix-patches@gnu.org; Mon, 12 Feb 2018 20:10:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:60614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elP6f-0001BQ-Si for guix-patches@gnu.org; Mon, 12 Feb 2018 20:10:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1elP6f-0003fF-M1 for guix-patches@gnu.org; Mon, 12 Feb 2018 20:10:01 -0500 Subject: [bug#30443] [PATCH] Add colobot Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elP5h-0003qr-8T for guix-patches@gnu.org; Mon, 12 Feb 2018 20:09:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elP5d-0000I5-EL for guix-patches@gnu.org; Mon, 12 Feb 2018 20:09:01 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elP5d-0000EL-5p for guix-patches@gnu.org; Mon, 12 Feb 2018 20:08:57 -0500 Received: from saiph (00004301a5269e39f4247da5.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301:a526:9e39:f424:7da5]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 4404DC5A44 for ; Tue, 13 Feb 2018 02:08:54 +0100 (CET) Received: from ngz by saiph with local (Exim 4.89) (envelope-from ) id 1elP5a-0003VK-I0 for guix-patches@gnu.org; Tue, 13 Feb 2018 02:08:54 +0100 From: Nicolas Goaziou Date: Tue, 13 Feb 2018 02:08:54 +0100 Message-ID: <873725vgpl.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30443@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello, The following patch adds the educational game: Colobot (Gold Edition). Feedback welcome. Regards, -- Nicolas Goaziou 0x80A93738 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-colobot.patch Content-Transfer-Encoding: quoted-printable Content-Description: Add Colobot >From c924704e440118a1aeede1f237b56744967cab66 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou 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 =C2=A9 2017 Marius Bakke ;;; Copyright =C2=A9 2017 Rutger Helling ;;; Copyright =C2=A9 2017 Roel Janssen -;;; Copyright =C2=A9 2017 Nicolas Goaziou +;;; Copyright =C2=A9 2017, 2018 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -5549,3 +5549,87 @@ hacking the gamification of contribution graphs on p= latforms 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=3D1") + #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 inst= all + ;; 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 lat= er + ;; 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 simi= lar +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+))) --=20 2.16.1 --=-=-=--