diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2024-02-19 22:30:46 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2024-02-20 08:45:39 +0100 |
commit | f0c839eb8a7846ee7c545876a3bea8e6a9489ab1 (patch) | |
tree | 94da90e7acb49efe55aaca0eda449cee78c73ffe /gnu | |
parent | 23f89717e401efb663acbcb11352cd3f73913b2f (diff) | |
download | guix-f0c839eb8a7846ee7c545876a3bea8e6a9489ab1.tar.gz guix-f0c839eb8a7846ee7c545876a3bea8e6a9489ab1.zip |
gnu: Add sugar-physics-activity.
* gnu/packages/sugar.scm (sugar-physics-activity): New variable.
Change-Id: Ic6b3da1a5ffe0ae177fa6b502d4ab34e84bbf082
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/sugar.scm | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm index 59d1f13730..5db070a72d 100644 --- a/gnu/packages/sugar.scm +++ b/gnu/packages/sugar.scm @@ -24,6 +24,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bash) #: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) @@ -728,6 +729,67 @@ looking for why an activity or Sugar is not working properly.") or you can also play with a friend!") (license license:gpl3+))) +(define-public sugar-physics-activity + (let ((commit "cfd17b82b783f1ce4952ccdef6a8ddbe3d8f3e46") + (revision "1")) + (package + (name "sugar-physics-activity") + (version (git-version "35" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sugarlabs/physics") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0yzq4cbgcngf1ayi4bsn04l3mz6pnayd6db9bv0v9xfrpjmffvyk")))) + (build-system python-build-system) + (arguments + (list + #:test-target "check" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-launcher + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "activity/activity.info" + (("exec = sugar-activity3") + (string-append "exec = " + (search-input-file inputs "/bin/sugar-activity3")))))) + (add-after 'unpack 'inject-load-path + (lambda _ + (substitute* "activity.py" + (("^import os") + (string-append "\ +import sys, os +for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"): + try: + sys.path.index(directory) + except ValueError: + sys.path.insert(1, directory) +"))))) + (replace 'install + (lambda _ + (setenv "HOME" "/tmp") + (invoke "python" "setup.py" "install" + (string-append "--prefix=" #$output))))))) + ;; All these libraries are accessed via gobject introspection. + (propagated-inputs + (list gtk+ + gdk-pixbuf)) + (inputs + (list python-pybox2d + python-pygame + sugar-toolkit-gtk3 + gettext-minimal)) + (home-page "https://github.com/sugarlabs/physics") + (synopsis "Physical world simulator and playground") + (description "Physics is a physical world simulator and playground---you +can add squares, circles, triangles, or draw your own shapes, and see them +come to life with forces (think gravity, Newton!), friction (scrrrrape), and +inertia (ahh, slow down!).") + (license license:gpl3+)))) + (define-public sugar-read-activity (let ((commit "25f69e41a4fa69d93c73c0c9367b4777a014b1cd") (revision "1")) |