aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/sugar.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-08-20 17:02:21 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-08-20 22:18:00 +0200
commitc22ee2b5ea03416b3ac04fc28c7390e82d84c69f (patch)
treea0efc311e21ff66935ee3e6b581e517a2d3ecb23 /gnu/packages/sugar.scm
parentae748e9ba6035bf6b91f5803cfc5122ffca1d2e7 (diff)
downloadguix-c22ee2b5ea03416b3ac04fc28c7390e82d84c69f.tar
guix-c22ee2b5ea03416b3ac04fc28c7390e82d84c69f.tar.gz
gnu: Add sugar-cellgame-activity.
* gnu/packages/sugar.scm (sugar-cellgame-activity): New variable. Change-Id: If81eff3b726b90c7454edcd08b2b8421067ce648
Diffstat (limited to 'gnu/packages/sugar.scm')
-rw-r--r--gnu/packages/sugar.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index 25cfbad13e..2cc5dc1685 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -503,6 +503,64 @@ a Tetris-like game.")
license:gpl2+
license:gpl3+))))
+(define-public sugar-cellgame-activity
+ (let ((commit "4a22fd177af224d2df588590eb835affacd5ca72")
+ (revision "1"))
+ (package
+ (name "sugar-cellgame-activity")
+ (version (git-version "5" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sugarlabs/cellgame")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "09dxq06dr43i3g8im4j1xffl19rzr1pwbixwgb0kipnmbx8pln5c"))))
+ (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 pygame")
+ (string-append "\
+import sys
+for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"):
+ try:
+ sys.path.index(directory)
+ except ValueError:
+ sys.path.insert(1, directory)
+import pygame
+")))))
+ (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+
+ sugar-toolkit-gtk3))
+ (inputs (list python-pygame))
+ (native-inputs
+ (list gettext-minimal))
+ (home-page "https://github.com/sugarlabs/cellgame")
+ (synopsis "Cell game for Sugar")
+ (description "This game for the Sugar desktop is based on the mechanisms
+present in gene regulatory networks.")
+ (license license:gpl3+))))
+
(define-public sugar-chat-activity
;; The last release was in 2019 and since then commits have been published
;; that include build fixes and translation updates.