GNU bug report logs - #35738
[PATCH] Add Childsplay

Previous Next

Package: guix-patches;

Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Date: Tue, 14 May 2019 20:59:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35738 in the body.
You can then email your comments to 35738 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35738; Package guix-patches. (Tue, 14 May 2019 20:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 14 May 2019 20:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add Childsplay
Date: Tue, 14 May 2019 22:45:12 +0200
[Message part 1 (text/plain, inline)]
Hello,

The following patch adds Childsplay.

Feedback welcome.

Regards,

-- 
Nicolas Goaziou
[0001-gnu-Add-childsplay.patch (text/x-diff, inline)]
From ccb4e336e467f5a357e54749b53b88a2500e4f1a Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Tue, 14 May 2019 22:11:08 +0200
Subject: [PATCH] gnu: Add childsplay.

* gnu/packages/education.scm (childsplay): New variable.
---
 gnu/packages/education.scm | 107 +++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index 4b93cd1023..6528375cfc 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -27,7 +27,10 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages fonts)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages game-development)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
@@ -370,3 +373,107 @@ keyboard is also available if the child does not have any other
 specialized device.")
     (home-page "https://bipede.fr/contrib/")
     (license license:gpl3)))
+
+(define-public childsplay
+  (package
+    (name "childsplay")
+    (version "3.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/schoolsplay/"
+                    "childsplay-" version ".tgz"))
+              (sha256
+               (base32
+                "0z7yp2swjnbz51vn2zyfnjn40jq38l5mbh15yafmx1z3vn2z1m77"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle-dejavu-font
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((dejavu-dir
+                     (string-append (assoc-ref inputs "font-dejavu")
+                                    "/share/fonts/truetype"))
+                    (dejavu-font
+                     (string-append dejavu-dir
+                                    "/DejaVuSansCondensed-Bold.ttf")))
+               (substitute* "SPConstants.py"
+                 (("^(TTF(BOLD)? = ).*" _ prefix)
+                  (string-append prefix "'" dejavu-font "'\n")))
+               (for-each (lambda (f) (delete-file f))
+                         (find-files "lib/SPData" "DejaVu"))
+               #t)))
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (pixmaps (string-append out "/share/pixmaps"))
+                    (share (string-append out "/share/childsplay"))
+                    (doc (string-append out "/share/doc/" ,name "-",version)))
+               ;; Install icon.
+               (install-file "lib/SPData/themes/childsplay/logo_cp.svg" pixmaps)
+               ;; Install data.
+               (mkdir-p share)
+               (for-each (lambda (f)
+                           (copy-recursively f (string-append share "/" f)))
+                         '("alphabet-sounds" "lib" "locale" "SPWidgets"))
+               (for-each (lambda (f) (install-file f share))
+                         (find-files "." "\\.(py|dev|db)$"))
+               ;; Install documentation.
+               (mkdir-p doc)
+               (copy-recursively "docs" doc)
+               #t)))
+         (add-after 'install 'create-executable
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((python (string-append (assoc-ref inputs "python")
+                                           "/bin/python"))
+                    (out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (executable (string-append bin "/childsplay")))
+               (mkdir-p bin)
+               (call-with-output-file executable
+                 (lambda (file)
+                   (format file
+                           "~a ~a"
+                           python
+                           (string-append out "/share/childsplay/childsplay.py"))))
+               (chmod executable #o555)
+               #t)))
+         (add-after 'install 'create-desktop-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (applications (string-append out "/share/applications")))
+               (mkdir-p applications)
+               (call-with-output-file
+                   (string-append applications "/childsplay.desktop")
+                 (lambda (file)
+                   (format file
+                           "[Desktop Entry]~@
+                            Name=Childsplay~@
+                            Comment=Suite of educational games for young children~@
+                            Comment[ca]=Conjunt de jocs educatius per a xiquets~@
+                            Comment[es]=Conjunto de juegos educativos para niños~@
+                            Comment[de]=Sammlung mit lehrreichen Spielen für kleine Kinder~@
+                            Exec=~a/bin/childsplay.py~@
+                            Terminal=false~@
+                            Icon=logo_cp.svg~@
+                            Type=Application~@
+                            Categories=Application;Game;Education;KidsGame;~@
+                            Keywords=suite;children;games;young;educational;~%"
+                           out)))
+               #t))))))
+    (inputs
+     `(("font-dejavu" ,font-dejavu)
+       ("pygame" ,python2-pygame)
+       ("sqlalchemy" ,python2-sqlalchemy)))
+    (synopsis "Suite of educational games for young children")
+    (description "Childsplay is a collection of educational activities
+for young children.  Childsplay can be used at home, kindergartens and
+pre-schools.  Childsplay is a fun and safe way to let young children
+use the computer and at the same time teach them a little math,
+letters of the alphabet, spelling, eye-hand coordination, etc.")
+    (home-page "http://www.childsplay.org")
+    (license license:gpl3+)))
-- 
2.21.0


Information forwarded to guix-patches <at> gnu.org:
bug#35738; Package guix-patches. (Tue, 14 May 2019 21:30:03 GMT) Full text and rfc822 format available.

Message #8 received at 35738 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, 35738 <at> debbugs.gnu.org
Subject: Re: [bug#35738] [PATCH] Add Childsplay
Date: Tue, 14 May 2019 23:29:49 +0200
On 5/14/19 10:45 PM, Nicolas Goaziou wrote:
> +    (synopsis "Suite of educational games for young children")
> +    (description "Childsplay is a collection of educational activities
> +for young children.  Childsplay can be used at home, kindergartens and
> +pre-schools.  Childsplay is a fun and safe way to let young children
> +use the computer and at the same time teach them a little math,
> +letters of the alphabet, spelling, eye-hand coordination, etc.")
> +    (home-page "http://www.childsplay.org")

I assume this has to be http://www.childsplay.mobi as long as you not
mean some fiddlers :)




Information forwarded to guix-patches <at> gnu.org:
bug#35738; Package guix-patches. (Wed, 15 May 2019 05:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 35738 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Cc: 35738 <at> debbugs.gnu.org
Subject: Re: [bug#35738] [PATCH] Add Childsplay
Date: Wed, 15 May 2019 07:48:44 +0200
Hello,

Jonathan Brielmaier <jonathan.brielmaier <at> web.de> writes:

> On 5/14/19 10:45 PM, Nicolas Goaziou wrote:
>> +    (synopsis "Suite of educational games for young children")
>> +    (description "Childsplay is a collection of educational activities
>> +for young children.  Childsplay can be used at home, kindergartens and
>> +pre-schools.  Childsplay is a fun and safe way to let young children
>> +use the computer and at the same time teach them a little math,
>> +letters of the alphabet, spelling, eye-hand coordination, etc.")
>> +    (home-page "http://www.childsplay.org")
>
> I assume this has to be http://www.childsplay.mobi as long as you not
> mean some fiddlers :)

Actually, I meant "http://www.schoolsplay.org", but I somehow mixed the
two URL. I will fix it. Thank you.

Regards,

-- 
Nicolas Goaziou




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Wed, 29 May 2019 23:32:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Wed, 29 May 2019 23:32:02 GMT) Full text and rfc822 format available.

Message #16 received at 35738-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 35738-done <at> debbugs.gnu.org
Subject: [PATCH] Add Childsplay
Date: Thu, 30 May 2019 01:30:56 +0200
Applied.

Thank you for the feedback.

-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.