From 3cfd12f305787e9e8b15d99fba2a2896832783aa Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 9 May 2018 23:27:21 +0200 Subject: gnu: Add snap. * gnu/packages/education.scm (snap): New variable. --- gnu/packages/education.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-) (limited to 'gnu/packages/education.scm') diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 58f06c3106..72cd7c61ba 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017, 2018 Efraim Flashner +;;; Copyright © 2018 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,27 +23,33 @@ (define-module (gnu packages education) #:use-module (ice-9 regex) #:use-module (gnu packages) - #:use-module (gnu packages qt) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages databases) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages javascript) #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages qt) #:use-module (gnu packages sdl) #:use-module (gnu packages texinfo) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) - #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (srfi srfi-1)) (define-public gcompris @@ -224,3 +231,65 @@ Useful support functions and an extensive progress tracker, topical lessons and the ability to create your own practice lessons make learning to type easy.") (license license:gpl2))) + +(define-public snap + (package + (name "snap") + (version "4.1.2.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jmoenig/Snap--Build-Your-Own-Blocks.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cy3jhqqpmivqnfm9kmlnh3fhf3m3y4xqhikblk8vfjprh6vmcvd")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (share (string-append out "/share/snap"))) + (copy-recursively source share) + ;; Replace the sole minified file in the package. + (with-directory-excursion share + (delete-file "FileSaver.min.js") + (symlink (string-append (assoc-ref %build-inputs "js-filesaver") + "/share/javascript/FileSaver.min.js") + "FileSaver.min.js")) + ;; Create a "snap" executable. + (let* ((bin (string-append out "/bin")) + (script (string-append bin "/snap")) + (snap (string-append share "/snap.html")) + (bash (string-append (assoc-ref %build-inputs "bash") + "/bin/sh")) + (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils") + "/bin/xdg-open"))) + (mkdir-p bin) + (call-with-output-file script + (lambda (port) + (format port "#!~a\n~a '~a'" bash xdg-open snap))) + (chmod script #o555))) + #t))) + (inputs + `(("bash" ,bash-minimal) + ("js-filesaver" ,js-filesaver) + ("xdg-utils" ,xdg-utils))) + (home-page "https://snap.berkeley.edu") + (synopsis "Visual, blocks based programming language") + (description "Snap! (formerly BYOB) is a visual, drag-and-drop +programming language. It is an extended reimplementation of Scratch (a +project of the Lifelong Kindergarten Group at the MIT Media Lab) that +allows you to Build Your Own Blocks. It also features first class +lists, first class procedures, and continuations. These added +capabilities make it suitable for a serious introduction to computer +science for high school or college students. + +This package provides a @command{snap} executable calling @command{xdg-open} +to open the application in a web browser, for offline usage.") + (license license:agpl3+))) -- cgit v1.2.3 From 946e5e8aa182cccdfeb43975db0b660bc83c2590 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 1 Apr 2018 07:39:32 +0200 Subject: gnu: tipp10: Use INVOKE. * gnu/packages/education.scm (tipp10)[arguments]: Substitute INVOKE for SYSTEM*. --- gnu/packages/education.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/education.scm') diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 72cd7c61ba..03050ffd0a 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017, 2018 Efraim Flashner +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. @@ -216,7 +217,7 @@ Currently available boards include: (substitute* "def/defines.h" (("\"/usr/") (string-append "\"" out "/"))) ;; Recreate Makefile - (zero? (system* "qmake")))))))) + (invoke "qmake"))))))) (inputs `(("qt4" ,qt-4) ("sqlite" ,sqlite))) -- cgit v1.2.3 From d53e5b366d03ce29a16d96fbf91075a2de5bbd55 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 3 Jun 2018 19:09:12 +0300 Subject: gnu: gcompris-qt: Update to 0.91. * gnu/packages/education.scm (gcompris-qt): Update to 0.91. [arguments]: Add custom phase to fix building with Qt 5.11. --- gnu/packages/education.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gnu/packages/education.scm') diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 03050ffd0a..15b893c30d 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -115,7 +115,7 @@ of categories with some of the activities available in that category. (define-public gcompris-qt (package (name "gcompris-qt") - (version "0.90") + (version "0.91") (source (origin (method url-fetch) @@ -124,11 +124,18 @@ of categories with some of the activities available in that category. version ".tar.xz")) (sha256 (base32 - "1i5adxnhig849qxwi3c4v7r84q6agx1zxkd69fh4y7lcmq2qiaza")))) + "09h098w9q79hnzla1pcpqlnnr6dbafm4q6zmdp7wlk11ym8n9kvg")))) (build-system cmake-build-system) (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-for-qt5.11 + (lambda _ + (substitute* "src/core/CMakeLists.txt" + (("qt5_use_modules") "target_link_libraries") + (("Qml Quick Gui Multimedia Network XmlPatterns Svg Xml Sensors Core") + "Qt5::Qml Qt5::Quick Qt5::Gui Qt5::Multimedia Qt5::Core Qt5::Svg Qt5::Xml Qt5::XmlPatterns Qt5::Sensors")) + #t)) (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- cgit v1.2.3