Patchwork [1/2] gnu: Add 0ad-data.

login
register
mail settings
Submitter non such
Date Oct. 16, 2016, 9:36 p.m.
Message ID <20161016213606.28234-2-ng0@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/16565/
State New
Headers show

Comments

non such - Oct. 16, 2016, 9:36 p.m.
* gnu/packages/games.scm (0ad-data): New variable.
---
 gnu/packages/games.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2bb53e0..03580a3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2994,3 +2994,49 @@  symbols, the game needs graphics to render the non-euclidean world.")
                    license:public-domain ; src/direntx.*
                    license:zlib          ; src/savepng.*
                    license:gpl2+))))     ; remaining files
+
+(define 0ad-data
+  (package
+    (name "0ad-data")
+    (version "0.0.20-alpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://releases.wildfiregames.com/0ad-"
+             version "-unix-data.tar.xz"))
+       (file-name (string-append name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1lzl8chfqbgs1n9vpn0xaqd70kpwiibfk196iblyq6qkms3v6pnv"))))
+    (build-system trivial-build-system)
+    (native-inputs
+     `(("source" ,source)
+       ("tar" ,tar)
+       ("xz" ,(@ (gnu packages compression) xz))))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((tar (string-append
+                     (assoc-ref %build-inputs "tar")
+                     "/bin/tar"))
+               (install-dir (string-append %output
+                                           "/share/0ad/data"))
+               (path (string-append (assoc-ref %build-inputs
+                                               "xz")
+                                    "/bin")))
+           (setenv "PATH" path)
+           (system* tar "xvf" (assoc-ref %build-inputs "source"))
+           (chdir (string-append "0ad-" ,version))
+           (mkdir-p install-dir)
+           (copy-recursively "." install-dir)))))
+    (synopsis "Data for the game 0ad")
+    (description
+     "Data files for 0ad.")
+    (home-page "http://play0ad.com")
+    (license (list license:gpl2
+                   ;; license:lppl1.3c  TODO: ADD.
+                   ;; license:bitstream-vera  TODO: ADD.
+                   license:cc-by-sa3.0))))