all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] gnu: Add minetest-data.
@ 2014-09-06 18:27 David Thompson
  2014-09-06 18:27 ` [PATCH 2/2] gnu: Add minetest David Thompson
  2014-09-06 21:18 ` [PATCH 1/2] gnu: Add minetest-data Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: David Thompson @ 2014-09-06 18:27 UTC (permalink / raw)
  To: guix-devel

* 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-06 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-06 18:27 [PATCH 1/2] gnu: Add minetest-data David Thompson
2014-09-06 18:27 ` [PATCH 2/2] gnu: Add minetest David Thompson
2014-09-06 21:20   ` Ludovic Courtès
2014-09-06 21:18 ` [PATCH 1/2] gnu: Add minetest-data Ludovic Courtès

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.