From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH 1/2] gnu: Add minetest-data. Date: Sat, 6 Sep 2014 14:27:02 -0400 Message-ID: <1410028023-16046-1-git-send-email-dthompson2@worcester.edu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQKhi-0000oI-Tc for guix-devel@gnu.org; Sat, 06 Sep 2014 14:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQKhd-0001QU-P5 for guix-devel@gnu.org; Sat, 06 Sep 2014 14:27:18 -0400 Received: from na3sys009aog133.obsmtp.com ([74.125.149.82]:44720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQKhd-0001QQ-Fu for guix-devel@gnu.org; Sat, 06 Sep 2014 14:27:13 -0400 Received: by mail-qa0-f54.google.com with SMTP id x12so12608905qac.27 for ; Sat, 06 Sep 2014 11:27:12 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/games.scm (minetest-data): New variable. --- gnu/packages/games.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3faf892..40f8fbf 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -25,6 +25,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) @@ -45,6 +46,7 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages linux) #:use-module (gnu packages zip) + #:use-module (guix build-system trivial) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake)) @@ -225,7 +227,7 @@ level's exit. The game is presented in a 2D side view.") (origin (method url-fetch) (uri (string-append "http://www.hyperrealm.com/" name "/" - name "-" version ".tar.gz")) + name "-" version ".tar.gz")) (sha256 (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6")))) (build-system gnu-build-system) @@ -235,7 +237,7 @@ level's exit. The game is presented in a 2D side view.") into stereotyped or otherwise humorous dialects. The filters are provided as a C library, so they can easily be integrated into other programs.") (license gpl2+))) - + (define-public cmatrix (package (name "cmatrix") @@ -305,11 +307,11 @@ interface or via an external visual interface such as GNU XBoard.") (build-system gnu-build-system) (arguments '(#:phases - (alist-cons-before + (alist-cons-before 'configure 'pre-conf ;; This is GNU. So use gnuchess as the first choice of engine (lambda _ - (substitute* "xboard.conf.in" + (substitute* "xboard.conf.in" (("-firstChessProgram fairymax") "-firstChessProgram gnuchess"))) %standard-phases))) (inputs `(("cairo" ,cairo) @@ -401,3 +403,47 @@ buffers, and audio capture.") C++.") (home-page "http://irrlicht.sourceforge.net/") (license zlib))) + +(define-public minetest-data + (package + (name "minetest-data") + (version "0.4.10") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/minetest/minetest_game/archive/" + version ".tar.gz")) + (sha256 + (base32 + "09mr71kl7mf4ihszqz1vnwk814p7fvqknad150iic2340a7qzf0i")))) + (build-system trivial-build-system) + (native-inputs + `(("source" ,source) + ("tar" ,tar) + ("gzip" ,(@ (gnu packages compression) gzip)) + ("coreutils" ,coreutils))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((tar (string-append (assoc-ref %build-inputs "tar") + "/bin/tar")) + (cp (string-append (assoc-ref %build-inputs + "coreutils") + "/bin/cp")) + (install-dir (string-append + %output + "/share/minetest/games/minetest_game")) + (path (string-append (assoc-ref %build-inputs + "gzip") + "/bin"))) + (setenv "PATH" path) + (system* tar "xvf" (assoc-ref %build-inputs "source")) + (chdir (string-append "minetest_game-" ,version)) + (mkdir-p install-dir) + (system* cp "-r" "." install-dir))))) + (synopsis "Main game data for the Minetest game engine") + (description + "Game data for the Minetest infinite-world block sandox game.") + (home-page "http://minetest.net") + (license lgpl2.1+))) -- 2.1.0