guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] gnu: Add minetest-data.


From: David Thompson
Subject: [PATCH 1/2] gnu: Add minetest-data.
Date: Sat, 6 Sep 2014 14:27:02 -0400

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]