From patchwork Tue May 14 20:45:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 13984 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D1F1116FF9; Tue, 14 May 2019 22:05:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,URIBL_BLOCKED, URIBL_SBL,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 4587A16FF6 for ; Tue, 14 May 2019 22:05:51 +0100 (BST) Received: from localhost ([127.0.0.1]:54176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQecQ-0004wo-Rn for patchwork@mira.cbaines.net; Tue, 14 May 2019 17:05:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQeVs-000083-C3 for guix-patches@gnu.org; Tue, 14 May 2019 16:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQeVq-0005Bg-RG for guix-patches@gnu.org; Tue, 14 May 2019 16:59:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQeVq-0005BX-N7 for guix-patches@gnu.org; Tue, 14 May 2019 16:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQeVq-0005Iq-Kp for guix-patches@gnu.org; Tue, 14 May 2019 16:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35738] [PATCH] Add Childsplay Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 May 2019 20:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35738 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35738@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155786750920331 (code B ref -1); Tue, 14 May 2019 20:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 May 2019 20:58:29 +0000 Received: from localhost ([127.0.0.1]:50025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeVE-0005Hm-2w for submit@debbugs.gnu.org; Tue, 14 May 2019 16:58:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeVB-0005HY-Nr for submit@debbugs.gnu.org; Tue, 14 May 2019 16:58:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:37016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQeV6-0004aw-E1 for submit@debbugs.gnu.org; Tue, 14 May 2019 16:58:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQeV4-0007lo-Mr for guix-patches@gnu.org; Tue, 14 May 2019 16:58:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQeIj-0007XO-4c for guix-patches@gnu.org; Tue, 14 May 2019 16:45:30 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37617) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQeId-0007El-Gr for guix-patches@gnu.org; Tue, 14 May 2019 16:45:28 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7B6171C0003 for ; Tue, 14 May 2019 20:45:13 +0000 (UTC) From: Nicolas Goaziou Date: Tue, 14 May 2019 22:45:12 +0200 Message-ID: <87tvdwojdz.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, The following patch adds Childsplay. Feedback welcome. Regards, From ccb4e336e467f5a357e54749b53b88a2500e4f1a Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou 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