unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH]: Add bambam
@ 2016-08-30 20:43 Efraim Flashner
  2016-08-30 21:11 ` Leo Famulari
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Efraim Flashner @ 2016-08-30 20:43 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 263 bytes --]

Keyboard mashing game that both of my kids love.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: 0001-gnu-Add-bambam.patch --]
[-- Type: text/plain, Size: 3687 bytes --]

From b0b225708818a7bcb3f4edadd913bd1de7ebd533 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Tue, 30 Aug 2016 23:40:27 +0300
Subject: [PATCH] gnu: Add bambam.

* gnu/packages/games.scm (bambam): New variable.
---
 gnu/packages/games.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ed5d7fd..9e44fbc 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+)))
-- 
2.9.3


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH]: Add bambam
  2016-08-30 20:43 [PATCH]: Add bambam Efraim Flashner
@ 2016-08-30 21:11 ` Leo Famulari
  2016-08-30 21:29   ` Efraim Flashner
  2016-08-31  6:56 ` Alex Kost
  2016-08-31  7:03 ` Alex Kost
  2 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-08-30 21:11 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

On Tue, Aug 30, 2016 at 11:43:13PM +0300, Efraim Flashner wrote:
> Subject: [PATCH] gnu: Add bambam.
> 
> * gnu/packages/games.scm (bambam): New variable.

Looks good!

I had to use my phone to look up how to exit the game :p

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH]: Add bambam
  2016-08-30 21:11 ` Leo Famulari
@ 2016-08-30 21:29   ` Efraim Flashner
  0 siblings, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2016-08-30 21:29 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

On Tue, Aug 30, 2016 at 05:11:08PM -0400, Leo Famulari wrote:
> On Tue, Aug 30, 2016 at 11:43:13PM +0300, Efraim Flashner wrote:
> > Subject: [PATCH] gnu: Add bambam.
> > 
> > * gnu/packages/games.scm (bambam): New variable.
> 
> Looks good!
> 
> I had to use my phone to look up how to exit the game :p

I think the first time I went to tty1 and pkilled it, then I read the
source code. I finally read the man page for it, 'mute' to mute the
sounds, 'unmute' to bring it back.

In case anyone is curious, type 'quit' to quit :).


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH]: Add bambam
  2016-08-30 20:43 [PATCH]: Add bambam Efraim Flashner
  2016-08-30 21:11 ` Leo Famulari
@ 2016-08-31  6:56 ` Alex Kost
  2016-08-31  7:03 ` Alex Kost
  2 siblings, 0 replies; 6+ messages in thread
From: Alex Kost @ 2016-08-31  6:56 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner (2016-08-30 23:43 +0300) wrote:

> Keyboard mashing game that both of my kids love.

Wow, this is really nice game, thanks!

-- 
Alex

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

* Re: [PATCH]: Add bambam
  2016-08-30 20:43 [PATCH]: Add bambam Efraim Flashner
  2016-08-30 21:11 ` Leo Famulari
  2016-08-31  6:56 ` Alex Kost
@ 2016-08-31  7:03 ` Alex Kost
  2016-08-31 17:21   ` Eric Bavier
  2 siblings, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-08-31  7:03 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Only a couple of small things :-)

[...]
> +(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'"))

This is an unusual indentation, I would write:

             (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")
                  Keyboard
"guix lint" reported it should begin with an upper-case letter.

> +    (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+)))

-- 
Alex

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

* Re: [PATCH]: Add bambam
  2016-08-31  7:03 ` Alex Kost
@ 2016-08-31 17:21   ` Eric Bavier
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Bavier @ 2016-08-31 17:21 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Wed, 31 Aug 2016 10:03:37 +0300
Alex Kost <alezost@gmail.com> wrote:

> Only a couple of small things :-)
> 
> [...]
> > +(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'"))  
> 
> This is an unusual indentation, I would write:
> 
>              (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")  
>                   Keyboard
> "guix lint" reported it should begin with an upper-case letter.
> 
> > +    (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+)))  
> 

Since I accidentaly pushed this patch with another batch, I went ahead
and made these changes.  I also removed the wrap-binary phase, which is
handled by python-build-system.  Pushed in
46a0622481c398bd9337522e93f6f9082d2b9015.

Thanks,
`~Eric

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

end of thread, other threads:[~2016-08-31 17:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 20:43 [PATCH]: Add bambam Efraim Flashner
2016-08-30 21:11 ` Leo Famulari
2016-08-30 21:29   ` Efraim Flashner
2016-08-31  6:56 ` Alex Kost
2016-08-31  7:03 ` Alex Kost
2016-08-31 17:21   ` Eric Bavier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).