aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-08-20 17:02:47 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-08-20 22:18:00 +0200
commite0633e56dc0cec3c13729255c7b804f27c722782 (patch)
treedbdc97f6e60fd7909414bef00517170b73cf376f
parent974be4b5ccd6d6afe01cc438165248a596f30512 (diff)
downloadguix-e0633e56dc0cec3c13729255c7b804f27c722782.tar
guix-e0633e56dc0cec3c13729255c7b804f27c722782.tar.gz
gnu: Add sugar-river-crossing-activity.
* gnu/packages/sugar.scm (sugar-river-crossing-activity): New variable. Change-Id: I05106843e9118b36e067856c3a00c9d54d7e1834
-rw-r--r--gnu/packages/sugar.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index ac17cc1397..bacb38111c 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -964,6 +964,66 @@ handheld mode, with extremely low power consumption and simple navigation
controls.")
(license license:gpl2+))))
+(define-public sugar-river-crossing-activity
+ (let ((commit "0abbeb455363672ed29d734e6e48f50ef78ec48b")
+ (revision "1"))
+ (package
+ (name "sugar-river-crossing-activity")
+ (version (git-version "1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sugarlabs/river-crossing-activity")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0h7c3i288vwz249figw3jwyylwhlh9qlgjhlbs902ldpmib0k237"))))
+ (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)))))))
+ ;; These libraries are accessed via gobject introspection.
+ (propagated-inputs
+ (list gtk+))
+ (inputs
+ (list python-pygame
+ sugar-toolkit-gtk3
+ gettext-minimal))
+ (home-page "https://github.com/sugarlabs/river-crossing-activity")
+ (synopsis "Puzzle game for Sugar desktop")
+ (description "A farmer is to ferry across a river a goat, a cabbage, and
+a wolf. The boat allows the farmer to carry only one of the three at a time.
+Without supervision, the goat will gobble the cabbage whereas the wolf will
+not hesitate to feast on the goat.")
+ (license license:gpl3+))))
+
(define-public sugar-terminal-activity
(let ((commit "a1f92b9da6121bc9a6fbba2c3f3b885dd26d4617")
(revision "1"))