From b0488fe54959b04f52e7acab7984c19dd0593791 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 30 Aug 2016 23:40:27 +0300 Subject: gnu: Add bambam. * gnu/packages/games.scm (bambam): New variable. --- gnu/packages/games.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'gnu/packages') 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 ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Alex Griffin -;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; ;;; 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+))) -- cgit v1.2.3