diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2024-08-20 17:02:47 +0200 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2024-08-20 22:18:00 +0200 |
| commit | e0633e56dc0cec3c13729255c7b804f27c722782 (patch) | |
| tree | dbdc97f6e60fd7909414bef00517170b73cf376f /gnu/packages/sugar.scm | |
| parent | 974be4b5ccd6d6afe01cc438165248a596f30512 (diff) | |
gnu: Add sugar-river-crossing-activity.
* gnu/packages/sugar.scm (sugar-river-crossing-activity): New variable.
Change-Id: I05106843e9118b36e067856c3a00c9d54d7e1834
Diffstat (limited to 'gnu/packages/sugar.scm')
| -rw-r--r-- | gnu/packages/sugar.scm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm index ac17cc1397e..bacb38111c4 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 | |||
| 964 | controls.") | 964 | controls.") |
| 965 | (license license:gpl2+)))) | 965 | (license license:gpl2+)))) |
| 966 | 966 | ||
| 967 | (define-public sugar-river-crossing-activity | ||
| 968 | (let ((commit "0abbeb455363672ed29d734e6e48f50ef78ec48b") | ||
| 969 | (revision "1")) | ||
| 970 | (package | ||
| 971 | (name "sugar-river-crossing-activity") | ||
| 972 | (version (git-version "1" revision commit)) | ||
| 973 | (source (origin | ||
| 974 | (method git-fetch) | ||
| 975 | (uri (git-reference | ||
| 976 | (url "https://github.com/sugarlabs/river-crossing-activity") | ||
| 977 | (commit commit))) | ||
| 978 | (file-name (git-file-name name version)) | ||
| 979 | (sha256 | ||
| 980 | (base32 | ||
| 981 | "0h7c3i288vwz249figw3jwyylwhlh9qlgjhlbs902ldpmib0k237")))) | ||
| 982 | (build-system python-build-system) | ||
| 983 | (arguments | ||
| 984 | (list | ||
| 985 | #:test-target "check" | ||
| 986 | #:phases | ||
| 987 | #~(modify-phases %standard-phases | ||
| 988 | (add-after 'unpack 'patch-launcher | ||
| 989 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 990 | (substitute* "activity/activity.info" | ||
| 991 | (("exec = sugar-activity3") | ||
| 992 | (string-append "exec = " | ||
| 993 | (search-input-file inputs "/bin/sugar-activity3")))))) | ||
| 994 | (add-after 'unpack 'inject-load-path | ||
| 995 | (lambda _ | ||
| 996 | (substitute* "activity.py" | ||
| 997 | (("^import pygame") | ||
| 998 | (string-append "\ | ||
| 999 | import sys | ||
| 1000 | for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"): | ||
| 1001 | try: | ||
| 1002 | sys.path.index(directory) | ||
| 1003 | except ValueError: | ||
| 1004 | sys.path.insert(1, directory) | ||
| 1005 | import pygame | ||
| 1006 | "))))) | ||
| 1007 | (replace 'install | ||
| 1008 | (lambda _ | ||
| 1009 | (setenv "HOME" "/tmp") | ||
| 1010 | (invoke "python" "setup.py" "install" | ||
| 1011 | (string-append "--prefix=" #$output))))))) | ||
| 1012 | ;; These libraries are accessed via gobject introspection. | ||
| 1013 | (propagated-inputs | ||
| 1014 | (list gtk+)) | ||
| 1015 | (inputs | ||
| 1016 | (list python-pygame | ||
| 1017 | sugar-toolkit-gtk3 | ||
| 1018 | gettext-minimal)) | ||
| 1019 | (home-page "https://github.com/sugarlabs/river-crossing-activity") | ||
| 1020 | (synopsis "Puzzle game for Sugar desktop") | ||
| 1021 | (description "A farmer is to ferry across a river a goat, a cabbage, and | ||
| 1022 | a wolf. The boat allows the farmer to carry only one of the three at a time. | ||
| 1023 | Without supervision, the goat will gobble the cabbage whereas the wolf will | ||
| 1024 | not hesitate to feast on the goat.") | ||
| 1025 | (license license:gpl3+)))) | ||
| 1026 | |||
| 967 | (define-public sugar-terminal-activity | 1027 | (define-public sugar-terminal-activity |
| 968 | (let ((commit "a1f92b9da6121bc9a6fbba2c3f3b885dd26d4617") | 1028 | (let ((commit "a1f92b9da6121bc9a6fbba2c3f3b885dd26d4617") |
| 969 | (revision "1")) | 1029 | (revision "1")) |
