projects/guix·blob java-team · refs

1481 lines · 58.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2023-2025 Ricardo Wurmus <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages sugar)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages abiword)
22 #:use-module (gnu packages audio)
23 #:use-module (gnu packages autotools)
24 #:use-module (gnu packages base)
25 #:use-module (gnu packages bash)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages freedesktop)
28 #:use-module (gnu packages game-development)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages gstreamer)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages networking)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages python-build)
39 #:use-module (gnu packages python-web)
40 #:use-module (gnu packages python-xyz)
41 #:use-module (gnu packages search)
42 #:use-module (gnu packages speech)
43 #:use-module (gnu packages sphinx)
44 #:use-module (gnu packages ssh)
45 #:use-module (gnu packages time)
46 #:use-module (gnu packages webkit)
47 #:use-module (gnu packages xorg)
48 #:use-module (guix build-system glib-or-gtk)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system pyproject)
51 #:use-module (guix download)
52 #:use-module (guix git-download)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix utils)
56 #:use-module (guix gexp))
57
58(define-public sugar
59 (package
60 (name "sugar")
61 (version "0.121")
62 (source (origin
63 (method git-fetch)
64 (uri (git-reference
65 (url "https://github.com/sugarlabs/sugar")
66 (commit (string-append "v" version))))
67 (file-name (git-file-name name version))
68 (sha256
69 (base32
70 "1s31sz1j7x82vynd233k7jqqp881bpz7486r78wfz2i84f2n4n06"))))
71 (build-system glib-or-gtk-build-system)
72 (arguments
73 (list
74 #:imported-modules
75 `(,@%glib-or-gtk-build-system-modules
76 ,@%pyproject-build-system-modules)
77 #:modules
78 `(((guix build pyproject-build-system) #:prefix py:)
79 ,@%glib-or-gtk-build-system-default-modules)
80 #:phases
81 #~(modify-phases %standard-phases
82 (add-after 'unpack 'patch-build-system
83 (lambda _
84 (substitute* "autogen.sh"
85 (("^\"\\$srcdir/configure" m)
86 (string-append "#" m)))
87 ;; This .po file does not exist
88 (substitute* "po/LINGUAS"
89 (("^ig") ""))))
90 (add-after 'unpack 'fix-references
91 (lambda* (#:key inputs #:allow-other-keys)
92 (substitute* "bin/sugar.in"
93 (("exec python3")
94 (string-append "exec " (which "python3"))))
95 (substitute* "src/jarabe/main.py"
96 (("'metacity'")
97 (string-append "'" (search-input-file inputs "/bin/metacity") "'"))
98 (("'metacity-message")
99 (string-append "'" (search-input-file inputs "/bin/metacity-message"))))
100 (substitute* "src/jarabe/intro/window.py"
101 (("ssh-keygen")
102 (search-input-file inputs "/bin/ssh-keygen"))
103 ;; ssh-keygen no longer supports dsa.
104 (("-t dsa") "-t rsa"))
105 (substitute* "src/jarabe/journal/model.py"
106 (("xdg-user-dir")
107 (search-input-file inputs "/bin/xdg-user-dir")))
108 (substitute* "extensions/cpsection/datetime/model.py"
109 (("/usr/share/zoneinfo/zone.tab")
110 (search-input-file inputs "/share/zoneinfo/zone.tab")))
111 (substitute* "extensions/cpsection/modemconfiguration/model.py"
112 (("/usr/share/zoneinfo/iso3166.tab")
113 (search-input-file inputs "/share/zoneinfo/iso3166.tab"))
114 (("/usr/share/mobile-broadband-provider-info")
115 (dirname
116 (search-input-file inputs
117 "/share/mobile-broadband-provider-info/serviceproviders.xml"))))
118 (substitute* "extensions/cpsection/aboutcomputer/model.py"
119 (("ethtool")
120 (search-input-file inputs "/sbin/ethtool")))
121 (substitute* "extensions/cpsection/language/model.py"
122 (("'locale'")
123 (string-append "'"
124 (search-input-file inputs "/bin/locale")
125 "'")))
126 ;; This is a global location on Guix System. Ideally we would
127 ;; have a search path here.
128 (substitute* "extensions/cpsection/background/model.py"
129 (("\\('/usr', 'share', 'backgrounds'\\)")
130 "('/run', 'current-system', 'profile', 'share', 'backgrounds')"))
131 (substitute* "src/jarabe/view/viewhelp.py"
132 (("/usr/share/sugar/activities/")
133 "/run/current-system/profile/share/sugar/activities/"))))
134 (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
135 (lambda* (#:key inputs outputs #:allow-other-keys)
136 (for-each
137 (lambda (executable)
138 (wrap-program executable
139 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
140 ,(py:site-packages inputs outputs)))
141 `("GI_TYPELIB_PATH" prefix
142 (,(getenv "GI_TYPELIB_PATH")))))
143 (find-files (string-append #$output "/bin") "^sugar.*")))))))
144 (inputs
145 (list bash-minimal
146 ethtool
147 gtk+
148 metacity
149 mobile-broadband-provider-info
150 openssh ;for ssh-keygen
151 python
152 sugar-toolkit-gtk3
153 tzdata
154 xdg-user-dirs))
155 ;; Some packages are propagated so that they can be used with gobject
156 ;; introspection at runtime; others are propagated for their dbus
157 ;; services.
158 (propagated-inputs
159 (list gsettings-desktop-schemas
160 gstreamer
161 gtk+
162 gtksourceview-3
163 libsoup-minimal
164 libwnck
165 libxklavier
166 network-manager
167 python-gwebsockets
168 sugar-artwork ;for cursor theme
169 sugar-datastore ;for org.laptop.sugar.DataStore
170 telepathy-gabble ;for link-local XMPP
171 telepathy-glib
172 ;; This is for org.freedesktop.Telepathy.AccountManager at runtime
173 telepathy-mission-control
174 telepathy-salut ;for XMPP neighborhood
175 ;; This is for the UPowerGlib namespace
176 upower
177 webkitgtk-for-gtk3))
178 (native-inputs
179 (list autoconf automake
180 gettext-minimal
181 intltool
182 (list glib "bin")
183 libtool
184 pkg-config
185 python-empy))
186 (home-page "https://www.sugarlabs.org/")
187 (synopsis "GTK shell")
188 (description "Sugar is the desktop environment component of a worldwide
189effort to provide every child with an equal opportunity for a quality
190education. Available in more than twenty-five languages, Sugar Activities are
191used every school day by children in more than forty countries.")
192 (license license:gpl3+)))
193
194(define-public sugar-artwork
195 (package
196 (name "sugar-artwork")
197 (version "0.121")
198 (source (origin
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/sugarlabs/sugar-artwork")
202 (commit (string-append "v" version))))
203 (file-name (git-file-name name version))
204 (sha256
205 (base32
206 "00m3dmwswfy4whc2hs51lqckz1z1f2jnw94jhxgw40b17w00pzwj"))))
207 (build-system gnu-build-system)
208 (arguments
209 (list
210 #:configure-flags
211 '(list "--without-gtk2")
212 #:phases
213 '(modify-phases %standard-phases
214 (add-after 'unpack 'patch-build-system
215 (lambda _
216 (substitute* "autogen.sh"
217 (("^\"\\$srcdir/configure" m)
218 (string-append "#" m))))))))
219 (inputs (list cairo gtk+))
220 (native-inputs
221 (list autoconf-2.71 automake
222 icon-naming-utils
223 libtool
224 pkg-config
225 python
226 python-empy
227 xcursorgen))
228 (home-page "https://www.sugarlabs.org/")
229 (synopsis "Sugar icons and themes")
230 (description "Sugar Artwork provides icons, and GTK+ CSS to build
231activities and other Sugar components.")
232 (license (list license:lgpl2.1+
233 license:asl2.0))))
234
235(define-public sugar-datastore
236 (package
237 (name "sugar-datastore")
238 (version "0.121")
239 (source (origin
240 (method git-fetch)
241 (uri (git-reference
242 (url "https://github.com/sugarlabs/sugar-datastore")
243 (commit (string-append "v" version))))
244 (file-name (git-file-name name version))
245 (sha256
246 (base32
247 "01mp0vyg9d6ig29p484prqlgqpa7a3pai8ki37dyk682gr0fhljb"))))
248 (build-system glib-or-gtk-build-system)
249 (arguments
250 (list
251 #:imported-modules
252 `(,@%glib-or-gtk-build-system-modules
253 ,@%pyproject-build-system-modules)
254 #:modules
255 `(((guix build pyproject-build-system) #:prefix py:)
256 ,@%glib-or-gtk-build-system-default-modules)
257 #:phases
258 #~(modify-phases %standard-phases
259 (add-after 'unpack 'patch-build-system
260 (lambda _
261 (substitute* "autogen.sh"
262 (("^\"\\$srcdir/configure" m)
263 (string-append "#" m)))))
264 (add-after 'unpack 'patch-tool-references
265 (lambda* (#:key inputs #:allow-other-keys)
266 (substitute* "src/carquinyol/datastore.py"
267 (("/usr/bin/du") (which "du")))
268 (substitute* "src/carquinyol/optimizer.py"
269 (("'md5sum'")
270 (string-append "'"
271 (search-input-file inputs "/bin/md5sum")
272 "'")))))
273 (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
274 (lambda* (#:key inputs outputs #:allow-other-keys)
275 (for-each
276 (lambda (executable)
277 (wrap-program executable
278 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
279 ,(py:site-packages inputs outputs)))
280 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
281 (list (search-input-file outputs "bin/copy-from-journal")
282 (search-input-file outputs "bin/copy-to-journal")
283 (search-input-file outputs
284 "bin/datastore-service"))))))))
285 (inputs
286 (list bash-minimal
287 coreutils
288 python
289 sugar-toolkit-gtk3))
290 (propagated-inputs
291 (list python-dbus-1.2
292 python-pygobject
293 python-xapian-bindings))
294 (native-inputs
295 (list autoconf-2.71
296 automake
297 libtool
298 pkg-config))
299 (home-page "https://www.sugarlabs.org/")
300 (synopsis "Service for Sugar activities to store and retrieve data")
301 (description "Sugar Datastore provides activities with a way to store data
302and metadata, and the journal with querying and full text search.")
303 (license license:gpl2+)))
304
305(define-public sugar-toolkit-gtk3
306 (package
307 (name "sugar-toolkit-gtk3")
308 (version "0.121")
309 (source (origin
310 (method git-fetch)
311 (uri (git-reference
312 (url "https://github.com/sugarlabs/sugar-toolkit-gtk3")
313 (commit (string-append "v" version))))
314 (file-name (git-file-name name version))
315 (sha256
316 (base32
317 "0x80jqx0z89jxfy2dvn4l35qbyvq3c2hg9jq4i0llq1qgkc4034b"))))
318 (build-system glib-or-gtk-build-system)
319 (arguments
320 (list
321 #:imported-modules (append %glib-or-gtk-build-system-modules
322 %pyproject-build-system-modules)
323 #:modules `(((guix build pyproject-build-system) #:prefix python:)
324 ,@%glib-or-gtk-build-system-default-modules)
325 #:phases
326 #~(modify-phases %standard-phases
327 (add-after 'unpack 'patch-build-system
328 (lambda _
329 (substitute* "autogen.sh"
330 (("^\"\\$srcdir/configure" m)
331 (string-append "#" m)))))
332 (add-after 'unpack 'patch-references
333 (lambda* (#:key inputs #:allow-other-keys)
334 (substitute* "src/sugar3/eggsmclient-xsmp.c"
335 (("/bin/rm") (search-input-file inputs "/bin/rm")))
336 (substitute* "src/sugar3/mime.py"
337 (("'/usr/local/share/'" m)
338 (string-append m ", '/run/current-system/profile/share'")))
339 (substitute* "src/sugar3/bundle/activitybundle.py"
340 (("'update-mime-database', mime_dir")
341 (string-append "'"
342 (search-input-file inputs "/bin/update-mime-database")
343 "', mime_dir")))
344 (substitute* "src/sugar3/bundle/bundle.py"
345 (("'unzip', '-o'")
346 (string-append "'"
347 (search-input-file inputs "/bin/unzip")
348 "', '-o'")))
349 ;; ssh-keygen no longer supports DSA.
350 (substitute* "src/sugar3/profile.py"
351 (("(.*)magic = 'ssh-dss '" m indent)
352 (string-append m "\n" indent "magicrsa = 'ssh-rsa '\n"))
353 (("if not line.startswith\\(magic\\)")
354 "if not line.startswith(magic) and not line.startswith(magicrsa)"))))
355 (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
356 (lambda* (#:key inputs outputs #:allow-other-keys)
357 (wrap-program (search-input-file outputs "bin/sugar-activity3")
358 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
359 ,(python:site-packages inputs outputs)))
360 `("GI_TYPELIB_PATH" prefix
361 (,(getenv "GI_TYPELIB_PATH")
362 ,(string-append #$output "/lib/girepository-1.0")))))))))
363 (inputs
364 (list alsa-lib
365 bash-minimal
366 libice
367 libsm
368 libx11
369 libxfixes
370 libxi
371 python
372 shared-mime-info
373 unzip))
374 (propagated-inputs
375 ;; The gi typelib files are needed by users of this library.
376 (list gdk-pixbuf
377 gobject-introspection
378 gstreamer ;for speech
379 gst-plugins-espeak
380 gtk+
381 (librsvg-for-system)
382
383 ;; This package is used as a Python library by users, so these must
384 ;; be propagated.
385 python-pycairo
386 python-dateutil
387 python-dbus-1.2
388 python-decorator
389 python-pygobject
390 python-six
391
392 telepathy-glib
393 webkitgtk-for-gtk3))
394 (native-inputs
395 (list autoconf-2.71
396 automake
397 gettext-minimal
398 glib
399 (list glib "bin")
400 intltool
401 libtool
402 pkg-config))
403 (home-page "https://www.sugarlabs.org/")
404 (synopsis "GTK+ widgets and services for Sugar components")
405 (description "Sugar Toolkit provides services and a set of GTK+ widgets to
406build activities and other Sugar components. This is the GTK+ 3 binding of
407the Sugar Toolkit.")
408 (license license:lgpl2.1+)))
409
410
411(define-public sugar-block-party-activity
412 (let ((commit "26a58f14254d6ae38b7bfa3cb2fc63291eefcc97")
413 (revision "1"))
414 (package
415 (name "sugar-block-party-activity")
416 (version (git-version "12" revision commit))
417 (source
418 (origin
419 (method git-fetch)
420 (uri (git-reference
421 (url "https://github.com/sugarlabs/block-party-activity")
422 (commit commit)))
423 (file-name (git-file-name name version))
424 (sha256
425 (base32 "0zinqhwmvyvk1zvs28dr71p68vb6widn4v3zp35zlzj4ayyn5rvx"))))
426 (build-system pyproject-build-system)
427 (arguments
428 (list
429 #:test-flags #~(list "check")
430 #:phases
431 #~(modify-phases %standard-phases
432 (add-after 'unpack 'patch-launcher
433 (lambda* (#:key inputs #:allow-other-keys)
434 (substitute* "activity/activity.info"
435 (("exec = sugar-activity3")
436 (string-append "exec = "
437 (search-input-file inputs
438 "/bin/sugar-activity3"))))))
439 (delete 'build)
440 (replace 'install
441 (lambda _
442 (invoke "python" "setup.py" "install"
443 (string-append "--prefix=" #$output)))))))
444 (native-inputs (list python-setuptools))
445 (propagated-inputs
446 (list gtk+
447 gstreamer
448 gst-plugins-base
449 sugar-toolkit-gtk3))
450 (home-page "https://github.com/sugarlabs/block-party-activity")
451 (synopsis "Tetris-like game for Sugar desktop environment")
452 (description "Block Party is an activity for the Sugar desktop providing
453a Tetris-like game.")
454 (license license:expat))))
455
456(define-public sugar-browse-activity
457 (package
458 (name "sugar-browse-activity")
459 (version "208")
460 (source
461 (origin
462 (method git-fetch)
463 (uri (git-reference
464 (url "https://github.com/sugarlabs/browse-activity")
465 (commit (string-append "v" version))))
466 (file-name (git-file-name name version))
467 (sha256
468 (base32 "1lxwkwz7bz8vd0jgsgvlwdm6gkrmzcmwlyqvp12j2jk5mpr4fp44"))))
469 (build-system pyproject-build-system)
470 (arguments
471 (list
472 #:test-flags #~(list "check")
473 #:phases
474 #~(modify-phases %standard-phases
475 (add-after 'unpack 'patch-reference-to-gschema-compiler
476 (lambda* (#:key inputs #:allow-other-keys)
477 (substitute* "browser.py"
478 (("glib-compile-schemas")
479 (search-input-file inputs "/bin/glib-compile-schemas")))))
480 (add-after 'unpack 'patch-launcher
481 (lambda* (#:key inputs #:allow-other-keys)
482 (substitute* "activity/activity.info"
483 (("exec = sugar-activity3")
484 (string-append "exec = "
485 (search-input-file inputs
486 "/bin/sugar-activity3"))))))
487 (delete 'build)
488 (replace 'install
489 (lambda _
490 (setenv "HOME" "/tmp")
491 (invoke "python" "setup.py" "install"
492 (string-append "--prefix=" #$output)))))))
493 ;; All these libraries are accessed via gobject introspection.
494 (propagated-inputs
495 (list evince
496 gobject-introspection
497 gtk+
498 (librsvg-for-system)
499 libsoup-minimal
500 python-pygobject
501 sugar-toolkit-gtk3
502 telepathy-glib
503 webkitgtk-for-gtk3))
504 (inputs (list (list glib "bin")))
505 (native-inputs (list gettext-minimal python-setuptools))
506 (home-page "https://help.sugarlabs.org/browse.html")
507 (synopsis "Sugar activity to browse the internet")
508 (description "Browse is a web browser activity for the Sugar desktop.")
509 (license (list license:cc0 ;metadata
510 license:lgpl2.0+
511 license:gpl2+
512 license:gpl3+))))
513
514(define-public sugar-cellgame-activity
515 (let ((commit "4a22fd177af224d2df588590eb835affacd5ca72")
516 (revision "1"))
517 (package
518 (name "sugar-cellgame-activity")
519 (version (git-version "5" revision commit))
520 (source
521 (origin
522 (method git-fetch)
523 (uri (git-reference
524 (url "https://github.com/sugarlabs/cellgame")
525 (commit commit)))
526 (file-name (git-file-name name version))
527 (sha256
528 (base32 "09dxq06dr43i3g8im4j1xffl19rzr1pwbixwgb0kipnmbx8pln5c"))))
529 (build-system pyproject-build-system)
530 (arguments
531 (list
532 #:test-flags #~(list "check")
533 #:phases
534 #~(modify-phases %standard-phases
535 (add-after 'unpack 'patch-launcher
536 (lambda* (#:key inputs #:allow-other-keys)
537 (substitute* "activity/activity.info"
538 (("exec = sugar-activity3")
539 (string-append "exec = "
540 (search-input-file inputs
541 "/bin/sugar-activity3"))))))
542 (add-after 'unpack 'inject-load-path
543 (lambda _
544 (substitute* "activity.py"
545 (("^import pygame")
546 (string-append "\
547import sys
548for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
549 try:
550 sys.path.index(directory)
551 except ValueError:
552 sys.path.insert(1, directory)
553import pygame
554")))))
555 (delete 'build)
556 (replace 'install
557 (lambda _
558 (setenv "HOME" "/tmp")
559 (invoke "python" "setup.py" "install"
560 (string-append "--prefix=" #$output)))))))
561 ;; All these libraries are accessed via gobject introspection.
562 (propagated-inputs (list gtk+ sugar-toolkit-gtk3))
563 (inputs (list python-pygame))
564 (native-inputs (list gettext-minimal python-setuptools))
565 (home-page "https://github.com/sugarlabs/cellgame")
566 (synopsis "Cell game for Sugar")
567 (description "This game for the Sugar desktop is based on the mechanisms
568present in gene regulatory networks.")
569 (license license:gpl3+))))
570
571(define-public sugar-chat-activity
572 ;; The last release was in 2019 and since then commits have been published
573 ;; that include build fixes and translation updates.
574 (let ((commit "a6a14b99576619639fd82fd265c4af096bcf52dc")
575 (revision "1"))
576 (package
577 (name "sugar-chat-activity")
578 (version (git-version "86" revision commit))
579 (source
580 (origin
581 (method git-fetch)
582 (uri (git-reference
583 (url "https://github.com/sugarlabs/chat")
584 (commit commit)))
585 (file-name (git-file-name name version))
586 (sha256
587 (base32 "1gp1ljazm119hqzwz0rkr6k588ngd68manndm808pj5vgbv7qsdq"))))
588 (build-system pyproject-build-system)
589 (arguments
590 (list
591 #:test-flags #~(list "check")
592 #:phases
593 #~(modify-phases %standard-phases
594 (add-after 'unpack 'patch-launcher
595 (lambda* (#:key inputs #:allow-other-keys)
596 (substitute* "activity/activity.info"
597 (("exec = sugar-activity3")
598 (string-append "exec = "
599 (search-input-file inputs
600 "/bin/sugar-activity3"))))))
601 (delete 'build)
602 (replace 'install
603 (lambda _
604 (setenv "HOME" "/tmp")
605 (invoke "python" "setup.py" "install"
606 (string-append "--prefix=" #$output)))))))
607 ;; All these libraries are accessed via gobject introspection.
608 (propagated-inputs
609 (list gdk-pixbuf
610 gobject-introspection
611 gtk+
612 gstreamer
613 gst-plugins-base
614 python-pygobject
615 sugar-toolkit-gtk3
616 telepathy-glib))
617 (native-inputs (list gettext-minimal python-setuptools))
618 (home-page "https://help.sugarlabs.org/chat.html")
619 (synopsis "Sugar activity to chat")
620 (description "Chat is an activity used to exchange messages with friends
621or classmates.")
622 (license license:gpl2+))))
623
624(define-public sugar-classify-cats-activity
625 (let ((commit "83aa89788c65bfdd3f77e24ac5a32b37f9518e54")
626 (revision "1"))
627 (package
628 (name "sugar-classify-cats-activity")
629 (version (git-version "2" revision commit))
630 (source
631 (origin
632 (method git-fetch)
633 (uri (git-reference
634 (url "https://github.com/sugarlabs/classify-cats")
635 (commit commit)))
636 (file-name (git-file-name name version))
637 (sha256
638 (base32 "101drh1dqgr9qsz3r1fzkcn5h6z720zskaqnz2aixzp2ybvh17wk"))))
639 (build-system pyproject-build-system)
640 (arguments
641 (list
642 #:test-flags #~(list "check")
643 #:phases
644 #~(modify-phases %standard-phases
645 (add-after 'unpack 'patch-launcher
646 (lambda* (#:key inputs #:allow-other-keys)
647 (substitute* "activity/activity.info"
648 (("exec = sugar-activity3")
649 (string-append "exec = "
650 (search-input-file inputs
651 "/bin/sugar-activity3"))))))
652 (delete 'build)
653 (replace 'install
654 (lambda _
655 (setenv "HOME" "/tmp")
656 (invoke "python" "setup.py" "install"
657 (string-append "--prefix=" #$output)))))))
658 ;; All these libraries are accessed via gobject introspection.
659 (propagated-inputs
660 (list gdk-pixbuf
661 gobject-introspection
662 gtk+
663 python-pygobject
664 sugar-toolkit-gtk3))
665 (native-inputs (list gettext-minimal python-setuptools))
666 (home-page "https://github.com/sugarlabs/classify-cats")
667 (synopsis "Classify cats based on various criteria")
668 (description "This is a Sugar activity where players classify cats based
669on various criteria.")
670 (license license:gpl3+))))
671
672(define-public sugar-commander-activity
673 (let ((commit "a018652903e1c52c86ebf23e3250e7b68327427f")
674 (revision "1"))
675 (package
676 (name "sugar-commander-activity")
677 (version (git-version "11" revision commit))
678 (source
679 (origin
680 (method git-fetch)
681 (uri (git-reference
682 (url "https://github.com/sugarlabs/sugar-commander")
683 (commit commit)))
684 (file-name (git-file-name name version))
685 (sha256
686 (base32 "02n5wqh9cwr3jnjaxyd9kxcls4h3fdhhxdcyvvxmya08h20idvgd"))))
687 (build-system pyproject-build-system)
688 (arguments
689 (list
690 #:test-flags #~(list "check")
691 #:phases
692 #~(modify-phases %standard-phases
693 (add-after 'unpack 'patch-launcher
694 (lambda* (#:key inputs #:allow-other-keys)
695 (substitute* "activity/activity.info"
696 (("exec = sugar-activity3")
697 (string-append "exec = "
698 (search-input-file inputs
699 "/bin/sugar-activity3"))))))
700 (add-after 'unpack 'inject-load-path
701 (lambda _
702 (substitute* "sugarcommander.py"
703 (("^import logging")
704 (string-append "\
705import sys
706for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
707 try:
708 sys.path.index(directory)
709 except ValueError:
710 sys.path.insert(1, directory)
711import logging
712")))))
713 (delete 'build)
714 (replace 'install
715 (lambda _
716 (setenv "HOME" "/tmp")
717 (invoke "python" "setup.py" "install"
718 (string-append "--prefix=" #$output)))))))
719 ;; All these libraries are accessed via gobject introspection.
720 (propagated-inputs
721 (list cairo
722 gdk-pixbuf
723 gobject-introspection
724 gtk+
725 python-pygobject
726 sugar-toolkit-gtk3))
727 (inputs (list python-pygame))
728 (native-inputs (list gettext-minimal python-setuptools))
729 (home-page "https://github.com/sugarlabs/sugar-commander")
730 (synopsis "Manage your Sugar journal")
731 (description
732 "Sugar-commander lets you import items from removable devices like USB
733drives and SD cards using a familiar hierarchical view of files on these
734devices, as opposed to the flattened Journal view that the Sugar Journal gives
735to these devices. It also enables you to see how much disk space each Journal
736entry uses, generates thumbnails, and does other things to enhance your use of
737the Journal.")
738 (license license:gpl2+))))
739
740(define-public sugar-help-activity
741 (let ((commit "492531e95a4c60af9b85c79c59c24c06c2cd4bb3")
742 (revision "1"))
743 (package
744 (name "sugar-help-activity")
745 (version (git-version "20" revision commit))
746 (source
747 (origin
748 (method git-fetch)
749 (uri (git-reference
750 (url "https://github.com/sugarlabs/help-activity")
751 (commit commit)))
752 (file-name (git-file-name name version))
753 (sha256
754 (base32 "0awjbqyc9f74dx0d7fgjk42vfsygxr8jhwqiv4hpggqcawc02xv8"))))
755 (build-system pyproject-build-system)
756 (arguments
757 (list
758 #:test-flags #~(list "check")
759 #:phases
760 #~(modify-phases %standard-phases
761 (add-after 'unpack 'use-newer-webkit
762 (lambda _
763 (substitute* "helpactivity.py"
764 (("'WebKit2', '4.0'")
765 "'WebKit2', '4.1'"))))
766 (add-after 'unpack 'patch-launcher
767 (lambda* (#:key inputs #:allow-other-keys)
768 (substitute* "activity/activity.info"
769 (("exec = sugar-activity3")
770 (string-append "exec = "
771 (search-input-file inputs
772 "/bin/sugar-activity3"))))))
773 (replace 'build
774 (lambda _
775 (invoke "make" "html")))
776 (replace 'install
777 (lambda _
778 (invoke "python" "setup.py" "install"
779 (string-append "--prefix=" #$output)))))))
780 (native-inputs
781 (list sugar-toolkit-gtk3 python-sphinx python-setuptools))
782 (propagated-inputs (list webkitgtk-for-gtk3))
783 (home-page "https://github.com/sugarlabs/help-activity")
784 (synopsis "Sugar activity for accessing documentation and manuals")
785 (description
786 "This is an activity for the Sugar environment which aims to provide
787users with easy access to documentation and manuals.")
788 (license license:gpl3+))))
789
790(define-public sugar-jukebox-activity
791 (let ((commit "44ad1da717904a7c7d93a08985b94468a9b7ab7a")
792 (revision "2"))
793 (package
794 (name "sugar-jukebox-activity")
795 (version (git-version "36" revision commit))
796 (source
797 (origin
798 (method git-fetch)
799 (uri (git-reference
800 (url "https://github.com/sugarlabs/jukebox-activity")
801 (commit commit)))
802 (file-name (git-file-name name version))
803 (sha256
804 (base32 "1c8g4h52jnwzk5vlkrkm8j0p5dbrjqd8hv3bdz5rp39w9in3skzk"))))
805 (build-system pyproject-build-system)
806 (arguments
807 (list
808 #:test-flags #~(list "check")
809 #:phases
810 #~(modify-phases %standard-phases
811 (add-after 'unpack 'patch-launcher
812 (lambda* (#:key inputs #:allow-other-keys)
813 (substitute* "activity/activity.info"
814 (("exec = sugar-activity3")
815 (string-append "exec = "
816 (search-input-file inputs
817 "/bin/sugar-activity3"))))))
818 (delete 'build)
819 (replace 'install
820 (lambda _
821 (setenv "HOME" "/tmp")
822 (invoke "python" "setup.py" "install"
823 (string-append "--prefix=" #$output)))))))
824 (native-inputs (list python-setuptools))
825 ;; All these libraries are accessed via gobject introspection.
826 (propagated-inputs
827 (list gtk+
828 gstreamer
829 gst-plugins-base
830 sugar-toolkit-gtk3))
831 (inputs (list gettext-minimal))
832 (home-page "https://help.sugarlabs.org/jukebox.html")
833 (synopsis "Media player for the Sugar learning environment")
834 (description
835 "Jukebox is the media player to play different kinds of audio and video
836files including online streams. It also supports playlists like @file{.m3u}
837and @file{.pls}.")
838 (license license:gpl2+))))
839
840(define-public sugar-log-activity
841 (let ((commit "0c45118958be14a1844456703f0b392de250bc88")
842 (revision "1"))
843 (package
844 (name "sugar-log-activity")
845 (version (git-version "42" revision commit))
846 (source
847 (origin
848 (method git-fetch)
849 (uri (git-reference
850 (url "https://github.com/sugarlabs/log-activity")
851 (commit commit)))
852 (file-name (git-file-name name version))
853 (sha256
854 (base32 "0pacd677gfhyym153x5grwimk8wgm4c9k0a463pq6fdrhm1g5wpc"))))
855 (build-system pyproject-build-system)
856 (arguments
857 (list
858 #:test-flags
859 #~(list "check")
860 #:phases
861 #~(modify-phases %standard-phases
862 (add-after 'unpack 'patch-locations
863 (lambda* (#:key inputs #:allow-other-keys)
864 (substitute* "logcollect.py"
865 (("'/sbin/ifconfig'")
866 (string-append "'"
867 (search-input-file inputs "/bin/ifconfig")
868 "'"))
869 (("'/sbin/route")
870 (string-append "'"
871 (search-input-file inputs "/bin/route")))
872 (("'/bin/df")
873 (string-append "'"
874 (search-input-file inputs "/bin/df")))
875 (("'/bin/ps")
876 (string-append "'"
877 (search-input-file inputs "/bin/ps")))
878 (("'/usr/bin/free")
879 (string-append "'"
880 (search-input-file inputs "/bin/free")))
881 (("'/usr/bin/top")
882 (string-append "'"
883 (search-input-file inputs "/bin/top")))
884 (("'/usr/share/sugar/activities")
885 "'/run/current-system/profile/share/sugar/activities"))))
886 (add-after 'unpack 'patch-launcher
887 (lambda* (#:key inputs #:allow-other-keys)
888 (substitute* "activity/activity.info"
889 (("exec = sugar-activity3")
890 (string-append "exec = "
891 (search-input-file inputs
892 "/bin/sugar-activity3"))))))
893 (delete 'build)
894 (replace 'install
895 (lambda _
896 (setenv "HOME" "/tmp")
897 (invoke "python" "setup.py" "install"
898 (string-append "--prefix=" #$output)))))))
899 ;; All these libraries are accessed via gobject introspection.
900 (propagated-inputs (list gtk+ sugar-toolkit-gtk3))
901 (inputs (list coreutils net-tools procps))
902 (native-inputs (list gettext-minimal python-setuptools))
903 (home-page "https://help.sugarlabs.org/log.html")
904 (synopsis "Log activity for the Sugar learning environment")
905 (description
906 "Log is part of the Sugar desktop. Log is used when
907looking for why an activity or Sugar is not working properly.")
908 (license license:gpl2+))))
909
910(define-public sugar-maze-activity
911 (package
912 (name "sugar-maze-activity")
913 (version "32")
914 (source
915 (origin
916 (method git-fetch)
917 (uri (git-reference
918 (url "https://github.com/sugarlabs/maze-activity")
919 (commit (string-append "v" version))))
920 (file-name (git-file-name name version))
921 (sha256
922 (base32 "0506mwxy3agyxlilb5v3pn29pg45lzaxm8rhj9azm58irs3wdmnq"))))
923 (build-system pyproject-build-system)
924 (arguments
925 (list
926 #:test-flags
927 #~(list "check")
928 #:phases
929 #~(modify-phases %standard-phases
930 (add-after 'unpack 'patch-launcher
931 (lambda* (#:key inputs #:allow-other-keys)
932 (substitute* "activity/activity.info"
933 (("exec = sugar-activity3")
934 (string-append "exec = "
935 (search-input-file inputs
936 "/bin/sugar-activity3"))))))
937 (delete 'build)
938 (replace 'install
939 (lambda _
940 (setenv "HOME" "/tmp")
941 (invoke "python" "setup.py" "install"
942 (string-append "--prefix=" #$output)))))))
943 (native-inputs (list python-setuptools))
944 ;; All these libraries are accessed via gobject introspection.
945 (propagated-inputs (list gtk+ telepathy-glib))
946 (inputs (list sugar-toolkit-gtk3 gettext-minimal))
947 (home-page "https://github.com/sugarlabs/maze-activity")
948 (synopsis "Simple maze game for the Sugar learning environment")
949 (description "Try to make your way through an increasingly difficult path,
950or you can also play with a friend!")
951 (license license:gpl3+)))
952
953(define-public sugar-physics-activity
954 (let ((commit "cfd17b82b783f1ce4952ccdef6a8ddbe3d8f3e46")
955 (revision "1"))
956 (package
957 (name "sugar-physics-activity")
958 (version (git-version "35" revision commit))
959 (source
960 (origin
961 (method git-fetch)
962 (uri (git-reference
963 (url "https://github.com/sugarlabs/physics")
964 (commit commit)))
965 (file-name (git-file-name name version))
966 (sha256
967 (base32 "0yzq4cbgcngf1ayi4bsn04l3mz6pnayd6db9bv0v9xfrpjmffvyk"))))
968 (build-system pyproject-build-system)
969 (arguments
970 (list
971 #:test-flags
972 #~(list "check")
973 #:phases
974 #~(modify-phases %standard-phases
975 (add-after 'unpack 'patch-launcher
976 (lambda* (#:key inputs #:allow-other-keys)
977 (substitute* "activity/activity.info"
978 (("exec = sugar-activity3")
979 (string-append "exec = "
980 (search-input-file inputs
981 "/bin/sugar-activity3"))))))
982 (add-after 'unpack 'inject-load-path
983 (lambda _
984 (substitute* "activity.py"
985 (("^import os")
986 (string-append "\
987import sys, os
988for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
989 try:
990 sys.path.index(directory)
991 except ValueError:
992 sys.path.insert(1, directory)
993")))))
994 (delete 'build)
995 (replace 'install
996 (lambda _
997 (setenv "HOME" "/tmp")
998 (invoke "python" "setup.py" "install"
999 (string-append "--prefix=" #$output)))))))
1000 (native-inputs (list python-setuptools))
1001 ;; All these libraries are accessed via gobject introspection.
1002 (propagated-inputs (list gtk+ gdk-pixbuf))
1003 (inputs (list python-pybox2d python-pygame sugar-toolkit-gtk3
1004 gettext-minimal))
1005 (home-page "https://github.com/sugarlabs/physics")
1006 (synopsis "Physical world simulator and playground")
1007 (description
1008 "Physics is a physical world simulator and playground---you can add
1009squares, circles, triangles, or draw your own shapes, and see them come to
1010life with forces (think gravity, Newton!), friction (scrrrrape), and inertia
1011(ahh, slow down!).")
1012 (license license:gpl3+))))
1013
1014(define-public sugar-portfolio-activity
1015 (let ((commit "331c3e2542b4885112fd32b3c32ed4f5916d204c")
1016 (revision "1"))
1017 (package
1018 (name "sugar-portfolio-activity")
1019 (version (git-version "52" revision commit))
1020 (source
1021 (origin
1022 (method git-fetch)
1023 (uri (git-reference
1024 (url "https://github.com/sugarlabs/portfolio-activity")
1025 (commit commit)))
1026 (file-name (git-file-name name version))
1027 (sha256
1028 (base32 "1zaab7ara40imkd85hilslc4rqyjsgkzrcngsrw99dryl9n4mx1p"))))
1029 (build-system pyproject-build-system)
1030 (arguments
1031 (list
1032 #:tests? #f ;there are none
1033 #:phases
1034 #~(modify-phases %standard-phases
1035 (add-after 'unpack 'patch-launcher
1036 (lambda* (#:key inputs #:allow-other-keys)
1037 (substitute* "activity/activity.info"
1038 (("exec = sugar-activity3")
1039 (string-append "exec = "
1040 (search-input-file inputs
1041 "/bin/sugar-activity3"))))))
1042 (delete 'build)
1043 (replace 'install
1044 (lambda _
1045 (setenv "HOME" "/tmp")
1046 (invoke "python" "setup.py" "install"
1047 (string-append "--prefix=" #$output)))))))
1048 (native-inputs (list python-setuptools))
1049 ;; All these libraries are accessed via gobject introspection.
1050 (propagated-inputs
1051 (list cairo
1052 pango
1053 gdk-pixbuf
1054 gobject-introspection
1055 gtk+
1056 gstreamer
1057 gst-plugins-base
1058 python-dbus-1.2
1059 python-pygobject
1060 sugar-datastore
1061 sugar-toolkit-gtk3
1062 telepathy-glib))
1063 (inputs (list gettext-minimal))
1064 (home-page "https://github.com/sugarlabs/portfolio-activity")
1065 (synopsis "Portfolio for the Sugar Journal")
1066 (description "The Portfolio activity creates a slide show from Sugar
1067Journal entries that have been ‘starred’.")
1068 (license license:gpl3+))))
1069
1070(define-public sugar-read-activity
1071 (package
1072 (name "sugar-read-activity")
1073 (version "124")
1074 (source
1075 (origin
1076 (method url-fetch)
1077 (uri (string-append
1078 "https://download.sugarlabs.org/sources/sucrose/fructose/"
1079 "Read/Read-" version ".tar.bz2"))
1080 (sha256
1081 (base32 "1hla80vclprqzahr8yfnin09spv4mab7il6a00ilz4anyahrzgzy"))))
1082 (build-system pyproject-build-system)
1083 (arguments
1084 (list
1085 #:test-flags
1086 #~(list "check")
1087 #:phases
1088 #~(modify-phases %standard-phases
1089 (add-after 'unpack 'patch-launcher
1090 (lambda* (#:key inputs #:allow-other-keys)
1091 (substitute* "activity/activity.info"
1092 (("exec = sugar-activity3")
1093 (string-append "exec = "
1094 (search-input-file inputs
1095 "/bin/sugar-activity3"))))))
1096 (delete 'build)
1097 (replace 'install
1098 (lambda _
1099 (setenv "HOME" "/tmp")
1100 (invoke "python" "setup.py" "install"
1101 (string-append "--prefix=" #$output)))))))
1102 (native-inputs (list python-setuptools))
1103 ;; All these libraries are accessed via gobject introspection.
1104 (propagated-inputs
1105 (list evince
1106 gtk+
1107 sugar-toolkit-gtk3
1108 webkitgtk-for-gtk3))
1109 (inputs (list gettext-minimal))
1110 (home-page "https://help.sugarlabs.org/read.html")
1111 (synopsis "Read PDF and TXT files in the Sugar learning environment")
1112 (description
1113 "The Read activity allows the laptop to act as a book reader. It has a
1114simple interface, and will view many kinds of text and image-based book-like
1115materials. It will have particular strengths in handheld mode, with extremely
1116low power consumption and simple navigation controls.")
1117 (license license:gpl2+)))
1118
1119(define-public sugar-river-crossing-activity
1120 (let ((commit "0abbeb455363672ed29d734e6e48f50ef78ec48b")
1121 (revision "1"))
1122 (package
1123 (name "sugar-river-crossing-activity")
1124 (version (git-version "1" revision commit))
1125 (source
1126 (origin
1127 (method git-fetch)
1128 (uri (git-reference
1129 (url "https://github.com/sugarlabs/river-crossing-activity")
1130 (commit commit)))
1131 (file-name (git-file-name name version))
1132 (sha256
1133 (base32 "0h7c3i288vwz249figw3jwyylwhlh9qlgjhlbs902ldpmib0k237"))))
1134 (build-system pyproject-build-system)
1135 (arguments
1136 (list
1137 #:test-flags
1138 #~(list "check")
1139 #:phases
1140 #~(modify-phases %standard-phases
1141 (add-after 'unpack 'patch-launcher
1142 (lambda* (#:key inputs #:allow-other-keys)
1143 (substitute* "activity/activity.info"
1144 (("exec = sugar-activity3")
1145 (string-append "exec = "
1146 (search-input-file inputs
1147 "/bin/sugar-activity3"))))))
1148 (add-after 'unpack 'inject-load-path
1149 (lambda _
1150 (substitute* "activity.py"
1151 (("^import pygame")
1152 (string-append "\
1153import sys
1154for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
1155 try:
1156 sys.path.index(directory)
1157 except ValueError:
1158 sys.path.insert(1, directory)
1159import pygame
1160")))))
1161 (delete 'build)
1162 (replace 'install
1163 (lambda _
1164 (setenv "HOME" "/tmp")
1165 (invoke "python" "setup.py" "install"
1166 (string-append "--prefix=" #$output)))))))
1167 (native-inputs (list python-setuptools))
1168 ;; These libraries are accessed via gobject introspection.
1169 (propagated-inputs (list gtk+))
1170 (inputs (list python-pygame sugar-toolkit-gtk3 gettext-minimal))
1171 (home-page "https://github.com/sugarlabs/river-crossing-activity")
1172 (synopsis "Puzzle game for Sugar desktop")
1173 (description
1174 "A farmer is to ferry across a river a goat, a cabbage, and a wolf.
1175The boat allows the farmer to carry only one of the three at a time. Without
1176supervision, the goat will gobble the cabbage whereas the wolf will not
1177hesitate to feast on the goat.")
1178 (license license:gpl3+))))
1179
1180(define-public sugar-terminal-activity
1181 (let ((commit "a1f92b9da6121bc9a6fbba2c3f3b885dd26d4617")
1182 (revision "1"))
1183 (package
1184 (name "sugar-terminal-activity")
1185 (version (git-version "47" revision commit))
1186 (source
1187 (origin
1188 (method git-fetch)
1189 (uri (git-reference
1190 (url "https://github.com/sugarlabs/terminal-activity")
1191 (commit commit)))
1192 (file-name (git-file-name name version))
1193 (sha256
1194 (base32 "11p7rrnlaw374h3qravhp915vdblvn07i2mnrzn7mhapkwvkg4h5"))))
1195 (build-system pyproject-build-system)
1196 (arguments
1197 (list
1198 #:test-flags
1199 #~(list "check")
1200 #:phases
1201 #~(modify-phases %standard-phases
1202 (add-after 'unpack 'patch-launcher
1203 (lambda* (#:key inputs #:allow-other-keys)
1204 (substitute* "activity/activity.info"
1205 (("exec = sugar-activity3")
1206 (string-append "exec = "
1207 (search-input-file inputs
1208 "/bin/sugar-activity3"))))))
1209 (delete 'build)
1210 (replace 'install
1211 (lambda _
1212 (setenv "HOME" "/tmp")
1213 (invoke "python" "setup.py" "install"
1214 (string-append "--prefix=" #$output)))))))
1215 (native-inputs (list python-setuptools))
1216 ;; All these libraries are accessed via gobject introspection.
1217 (propagated-inputs (list gtk+ vte/gtk+-3 sugar-toolkit-gtk3))
1218 (inputs (list gettext-minimal))
1219 (home-page "https://help.sugarlabs.org/terminal.html")
1220 (synopsis "Terminal activity for the Sugar learning environment")
1221 (description "Terminal is a full-screen text mode program that provides
1222a Command-Line Interface (CLI) to the system.")
1223 (license (list license:gpl2+ license:gpl3+)))))
1224
1225(define-public sugar-turtleart-activity
1226 (let ((commit "a4340adea18efbdb987eca6477fa71d5c924811f")
1227 (revision "1"))
1228 (package
1229 (name "sugar-turtleart-activity")
1230 (version (git-version "202" revision commit))
1231 (source
1232 (origin
1233 (method git-fetch)
1234 (uri (git-reference
1235 (url "https://github.com/sugarlabs/turtleart-activity")
1236 (commit commit)))
1237 (file-name (git-file-name name version))
1238 (sha256
1239 (base32 "11agqyahjhxb7bakzix63lazcbin0jfiypqx0sm2i85bsl30fp7y"))))
1240 (build-system pyproject-build-system)
1241 (arguments
1242 (list
1243 #:test-flags
1244 #~(list "check")
1245 #:phases
1246 #~(modify-phases %standard-phases
1247 (add-after 'unpack 'patch-launcher
1248 (lambda* (#:key inputs #:allow-other-keys)
1249 (substitute* "activity/activity.info"
1250 (("exec = sugar-activity3")
1251 (string-append "exec = "
1252 (search-input-file inputs
1253 "/bin/sugar-activity3"))))))
1254 (add-after 'unpack 'patch-locations
1255 (lambda _
1256 (substitute* "setup.py"
1257 (("'/usr/share/applications")
1258 "'share/applications"))))
1259 (add-after 'unpack 'patch-tool-references
1260 (lambda* (#:key inputs #:allow-other-keys)
1261 (substitute* '("TurtleArtActivity.py"
1262 "TurtleArt/turtleblocks.py")
1263 (("glib-compile-schemas")
1264 (search-input-file inputs "/bin/glib-compile-schemas")))
1265 (substitute* '("plugins/turtle_blocks_extras/turtle_blocks_extras.py"
1266 "pysamples/speak.py"
1267 "TurtleArt/tacollaboration.py")
1268 (("'espeak")
1269 (string-append "'"
1270 (search-input-file inputs "/bin/espeak"))))
1271 (substitute* '("pysamples/csound.py"
1272 "plugins/turtle_blocks_extras/turtle_blocks_extras.py")
1273 (("'csound '")
1274 (string-append "'"
1275 (search-input-file inputs "/bin/csound")
1276 " '")))
1277 (substitute* '("plugins/turtle_blocks_extras/turtle_blocks_extras.py"
1278 "pysamples/speak.py"
1279 "TurtleArt/tacollaboration.py")
1280 (("\\| aplay")
1281 (string-append "| "
1282 (search-input-file inputs "/bin/aplay"))))
1283 (substitute* "pysamples/sinewave.py"
1284 (("'speaker-test")
1285 (string-append "'"
1286 (search-input-file inputs
1287 "/bin/speaker-test"))))))
1288 (delete 'build)
1289 (replace 'install
1290 (lambda _
1291 (setenv "HOME" "/tmp")
1292 (invoke "python" "setup.py" "install"
1293 (string-append "--prefix=" #$output)))))))
1294 (native-inputs (list python-setuptools))
1295 ;; All these libraries are accessed via gobject introspection.
1296 (propagated-inputs
1297 (list gstreamer
1298 gtk+
1299 telepathy-glib
1300 webkitgtk-for-gtk3))
1301 (inputs
1302 (list alsa-utils
1303 csound
1304 espeak
1305 (list glib "bin")
1306 gettext-minimal
1307 sugar-toolkit-gtk3))
1308 (home-page "https://help.sugarlabs.org/en/turtleart.html")
1309 (synopsis "Block-based Logo programming environment")
1310 (description
1311 "Turtle Art, also known as Turtle Blocks, is an activity with a
1312Logo-inspired graphical “turtle” that draws colorful art based on
1313snap-together visual programming elements. Its “low floor” provides an easy
1314entry point for beginners. It also has “high ceiling” programming,
1315graphics,mathematics, and Computer Science features which will challenge the
1316more adventurous student.")
1317 (license license:expat))))
1318
1319(define-public sugar-turtlepond-activity
1320 (let ((commit "e460fc472d2f900c4c71659dbec07a715a3847a7")
1321 (revision "1"))
1322 (package
1323 (name "sugar-turtlepond-activity")
1324 (version (git-version "10" revision commit))
1325 (source
1326 (origin
1327 (method git-fetch)
1328 (uri (git-reference
1329 (url "https://github.com/sugarlabs/turtlepond")
1330 (commit commit)))
1331 (file-name (git-file-name name version))
1332 (sha256
1333 (base32 "0j7jzbwi2aph312f5dazmwgxqzh458b4yzz8mvrdxpr91ksxd4h4"))))
1334 (build-system pyproject-build-system)
1335 (arguments
1336 (list
1337 #:test-flags
1338 #~(list "check")
1339 #:phases
1340 #~(modify-phases %standard-phases
1341 (add-after 'unpack 'patch-launcher
1342 (lambda* (#:key inputs #:allow-other-keys)
1343 (substitute* "activity/activity.info"
1344 (("exec = sugar-activity3")
1345 (string-append "exec = "
1346 (search-input-file inputs
1347 "/bin/sugar-activity3"))))))
1348 #;
1349 (add-after 'unpack 'inject-load-path
1350 (lambda _
1351 (substitute* "TurtlePondActivity.py"
1352 (("^import logging")
1353 (string-append "\
1354import sys
1355for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
1356 try:
1357 sys.path.index(directory)
1358 except ValueError:
1359 sys.path.insert(1, directory)
1360import logging
1361")))))
1362 (delete 'build)
1363 (replace 'install
1364 (lambda _
1365 (setenv "HOME" "/tmp")
1366 (invoke "python" "setup.py" "install"
1367 (string-append "--prefix=" #$output)))))))
1368 ;; All these libraries are accessed via gobject introspection.
1369 (propagated-inputs
1370 (list cairo
1371 gdk-pixbuf
1372 gobject-introspection
1373 gtk+
1374 python-pygobject
1375 sugar-toolkit-gtk3))
1376 (native-inputs (list gettext-minimal python-setuptools))
1377 (home-page "https://github.com/sugarlabs/turtlepond")
1378 (synopsis "Turtle-based strategy game")
1379 (description "Turtle in a Pond is a strategy game. The goal is to
1380surround the turtle before it runs off the screen.")
1381 (license license:gpl2+))))
1382
1383(define-public sugar-typing-turtle-activity
1384 (package
1385 (name "sugar-typing-turtle-activity")
1386 (version "32")
1387 (source
1388 (origin
1389 (method git-fetch)
1390 (uri (git-reference
1391 (url "https://github.com/sugarlabs/typing-turtle-activity")
1392 (commit (string-append "v" version))))
1393 (file-name (git-file-name name version))
1394 (sha256
1395 (base32 "0shadv9wgddjvl97kvsqb8iw1wmmfw5lzcqk78hd70pzvh4c1hmd"))))
1396 (build-system pyproject-build-system)
1397 (arguments
1398 (list
1399 #:test-flags
1400 #~(list "check")
1401 #:phases
1402 #~(modify-phases %standard-phases
1403 (add-after 'unpack 'patch-reference-to-executables
1404 (lambda* (#:key inputs #:allow-other-keys)
1405 (substitute* "keyboard.py"
1406 (("setxkbmap")
1407 (search-input-file inputs "/bin/setxkbmap")))))
1408 (add-after 'unpack 'patch-launcher
1409 (lambda* (#:key inputs #:allow-other-keys)
1410 (substitute* "activity/activity.info"
1411 (("exec = sugar-activity3")
1412 (string-append "exec = "
1413 (search-input-file inputs
1414 "/bin/sugar-activity3"))))))
1415 (delete 'build)
1416 (replace 'install
1417 (lambda _
1418 (invoke "python" "setup.py" "install"
1419 (string-append "--prefix=" #$output)))))))
1420 (native-inputs
1421 (list gettext-minimal sugar-toolkit-gtk3 python-setuptools))
1422 (inputs (list setxkbmap))
1423 (home-page "https://help.sugarlabs.org/en/typing_turtle.html")
1424 (synopsis "Learn typing")
1425 (description
1426 "Need some help typing? In this activity for the Sugar environment you
1427will learn the best way to hold your hands in order for you to become a faster
1428typist.")
1429 (license license:gpl3+)))
1430
1431(define-public sugar-write-activity
1432 (let ((commit "dd854c06378cabf0d064d8dc87b5789d2a1a7746")
1433 (revision "1"))
1434 (package
1435 (name "sugar-write-activity")
1436 (version (git-version "101" revision commit))
1437 (source
1438 (origin
1439 (method git-fetch)
1440 (uri (git-reference
1441 (url "https://github.com/sugarlabs/write-activity")
1442 (commit commit)))
1443 (file-name (git-file-name name version))
1444 (sha256
1445 (base32 "0lw34hf31fyfvqilzlmcz3c7zki0iqkn1zp2sv3dih016gwqg5pw"))))
1446 (build-system pyproject-build-system)
1447 (arguments
1448 (list
1449 #:test-flags
1450 #~(list "check")
1451 #:phases
1452 #~(modify-phases %standard-phases
1453 (add-after 'unpack 'patch-launcher
1454 (lambda* (#:key inputs #:allow-other-keys)
1455 (substitute* "activity/activity.info"
1456 (("exec = sugar-activity3")
1457 (string-append "exec = "
1458 (search-input-file inputs
1459 "/bin/sugar-activity3"))))))
1460 (delete 'build)
1461 (replace 'install
1462 (lambda _
1463 (setenv "HOME" "/tmp")
1464 (invoke "python" "setup.py" "install"
1465 (string-append "--prefix=" #$output)))))))
1466 (native-inputs (list python-setuptools))
1467 ;; All these libraries are accessed via gobject introspection.
1468 (propagated-inputs
1469 (list abiword
1470 gdk-pixbuf
1471 gtk+
1472 libgsf
1473 telepathy-glib))
1474 (inputs (list sugar-toolkit-gtk3 gettext-minimal))
1475 (home-page "https://help.sugarlabs.org/write.html")
1476 (synopsis "Word processor for Sugar desktop")
1477 (description
1478 "Write is a word processor activity for the Sugar desktop. Write embeds
1479the AbiWord word processor, and can be used to write and edit text
1480documents.")
1481 (license license:gpl2+))))