From patchwork Sun Oct 6 18:18:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 15665 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1D12717524; Sun, 6 Oct 2019 19:19:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BE2FD174EC for ; Sun, 6 Oct 2019 19:19:18 +0100 (BST) Received: from localhost ([::1]:36238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHB7m-00035r-AV for patchwork@mira.cbaines.net; Sun, 06 Oct 2019 14:19:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44606) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHB7Y-0002ww-LM for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHB7X-00069C-0y for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHB7W-000698-UN for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHB7W-0000wJ-Pk for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36978] [PATCH v2 3/3] gnu: Add unknown-horizons. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Oct 2019 18:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36978@debbugs.gnu.org Received: via spool by 36978-submit@debbugs.gnu.org id=B36978.15703859103554 (code B ref 36978); Sun, 06 Oct 2019 18:19:02 +0000 Received: (at 36978) by debbugs.gnu.org; 6 Oct 2019 18:18:30 +0000 Received: from localhost ([127.0.0.1]:46844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHB6u-0000v1-7x for submit@debbugs.gnu.org; Sun, 06 Oct 2019 14:18:30 -0400 Received: from mira.cbaines.net ([212.71.252.8]:45544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHB6p-0000ud-W2 for 36978@debbugs.gnu.org; Sun, 06 Oct 2019 14:18:20 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 2FAC617524 for <36978@debbugs.gnu.org>; Sun, 6 Oct 2019 19:18:19 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 36476f88 for <36978@debbugs.gnu.org>; Sun, 6 Oct 2019 18:18:18 +0000 (UTC) From: Christopher Baines Date: Sun, 6 Oct 2019 19:18:18 +0100 Message-Id: <20191006181818.18333-3-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006181818.18333-1-mail@cbaines.net> References: <20191006181818.18333-1-mail@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/games.scm (unknown-horizons): New variable. --- gnu/packages/games.scm | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 0ebf262126..055ba216a3 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2306,6 +2306,79 @@ against each other or just trying to beat the computer; single-player mode is also available.") (license license:gpl3+))) +(define-public unknown-horizons + (package + (name "unknown-horizons") + (version "2019.1") + (source (origin + (method url-fetch) + (uri (string-append "https://codeload.github.com/unknown-horizons/" + "unknown-horizons/tar.gz/" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4")))) + (build-system python-build-system) + (arguments + '(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'set-HOME + (lambda _ + (setenv "HOME" "/tmp"))) + (add-after 'build 'build-extra + (lambda _ + (invoke "python3" "./setup.py" "build_i18n") + (invoke "python3" "horizons/engine/generate_atlases.py" "2048") + #t)) + (add-after 'install 'patch + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/bin/unknown-horizons") + (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)") + (string-append "os.chdir(\"" + (assoc-ref outputs "out") + "/share/unknown-horizons\")")))) + #t)) + ;; TODO: Run GUI tests as well + (replace 'check + (lambda _ + (substitute* "horizons/constants.py" + (("IS_DEV_VERSION = False") + "IS_DEV_VERSION = True")) + (invoke "pytest" "tests") + (substitute* "horizons/constants.py" + (("IS_DEV_VERSION = True") + "IS_DEV_VERSION = False")) + #t))))) + (inputs + `(("fifengine" ,fifengine) + ("python:tk" ,python "tk") + ("python-pillow" ,python-pillow) + ("python-pyyaml" ,python-pyyaml))) + (native-inputs + `(("intltool" ,intltool) + + ;; Required for tests + ("python-greenlet" ,python-greenlet) + ("python-polib" ,python-polib) + ("python-pytest" ,python-pytest) + ("python-pytest-mock" ,python-pytest-mock))) + (home-page "http://unknown-horizons.org/") + (synopsis "Isometric realtime strategy, economy and city building simulation") + (description + "Unknown Horizons is a 2D realtime strategy simulation with an emphasis +on economy and city building. Expand your small settlement to a strong and +wealthy colony, collect taxes and supply your inhabitants with valuable +goods. Increase your power with a well balanced economy and with strategic +trade and diplomacy.") + (license (list + license:gpl2+ ; Covers code + license:expat ; tests/dummy.py, ext/polib.py + license:cc-by-sa3.0 ; Covers some media content + license:cc-by3.0 ; Covers some media content + license:bsd-3)))) ; horizons/ext/speaklater.py + (define-public gnujump (package (name "gnujump")