summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2016-08-30 23:40:27 +0300
committerEric Bavier <bavier@member.fsf.org>2016-08-31 00:46:59 -0500
commitb0488fe54959b04f52e7acab7984c19dd0593791 (patch)
tree3264552e901a3c9f5f4b6e688b2eaa43cbd199c9
parent491651450306b49fb767b505e299b383bcd05754 (diff)
downloadguix-b0488fe54959b04f52e7acab7984c19dd0593791.tar.gz
gnu: Add bambam.
* gnu/packages/games.scm (bambam): New variable.
-rw-r--r--gnu/packages/games.scm55
1 files changed, 54 insertions, 1 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ed5d7fd52e..9e44fbc6b2 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -21,7 +21,7 @@
 ;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il"
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -103,6 +103,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial))
 
@@ -2773,3 +2774,55 @@ Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
 Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog.  Experienced
 programmers may also add their own favorite language.")
     (license license:gpl3+)))
+
+(define-public bambam
+  (package
+    (name "bambam")
+    (version "0.5")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/porridge/bambam/archive/"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "10w110mjdwbvddzihh9rganvvjr5jfiz8cs9n7w12zndwwcc3ria"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)
+         (add-before 'install 'patch-data-dir-location
+           (lambda _
+             (substitute* "bambam.py"
+                          (("'data'")
+                           "'../share/bambam/data'"))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin"))
+                    (share (string-append out "/share")))
+               (mkdir-p bin)
+               (copy-file "bambam.py" (string-append bin "/bambam"))
+               (install-file "bambam.6" (string-append share "/man/man6"))
+               (copy-recursively "data" (string-append share "/bambam/data")))
+             #t))
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/bambam")))
+               (wrap-program bin
+                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
+             #t)))))
+    (inputs
+     `(("python-pygame" ,python-pygame)))
+    (home-page "https://github.com/porridge/bambam")
+    (synopsis "keyboard mashing and doodling game for babies")
+    (description "Bambam is a simple baby keyboard (and gamepad) masher
+application that locks the keyboard and mouse and instead displays bright
+colors, pictures, and sounds.")
+    (license license:gpl3+)))