From c8133d2a57e442b0b78eb0249f7823e5fd0674ca Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 6 Sep 2025 19:44:54 +0200 Subject: [PATCH] gnu: sugar-river-crossing-activity: Switch to pyproject. * gnu/packages/sugar.scm (sugar-river-crossing-activity): Run guix style. [build-system]: Switch to pyproject-build-system. [arguments]: Replace <#:test-target> with <#:test-flags>. <#:phases>: Run guix style. Delete 'build phase. [native-inputs]: Add python-setuptools-next. Change-Id: Ie0c7b677df17991974908bed17ac7b9f3880ee30 Signed-off-by: Sharlatan Hellseher --- gnu/packages/sugar.scm | 45 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm index cc0936efd095f55d6f7cb1644f25f6a297e39fd8..5fe117d3a174ecd237f7a65558e7f9b9778ed38c 100644 --- a/gnu/packages/sugar.scm +++ b/gnu/packages/sugar.scm @@ -1124,19 +1124,20 @@ low power consumption and simple navigation controls.") (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) + (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 pyproject-build-system) (arguments (list - #:test-target "check" + #:test-flags + #~(list "check") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-launcher @@ -1144,7 +1145,8 @@ low power consumption and simple navigation controls.") (substitute* "activity/activity.info" (("exec = sugar-activity3") (string-append "exec = " - (search-input-file inputs "/bin/sugar-activity3")))))) + (search-input-file inputs + "/bin/sugar-activity3")))))) (add-after 'unpack 'inject-load-path (lambda _ (substitute* "activity.py" @@ -1158,24 +1160,23 @@ for directory in \"" (getenv "GUIX_PYTHONPATH") "\".split(\":\"): sys.path.insert(1, directory) import pygame "))))) + (delete 'build) (replace 'install (lambda _ (setenv "HOME" "/tmp") (invoke "python" "setup.py" "install" (string-append "--prefix=" #$output))))))) + (native-inputs (list python-setuptools-next)) ;; These libraries are accessed via gobject introspection. - (propagated-inputs - (list gtk+)) - (inputs - (list python-pygame - sugar-toolkit-gtk3 - gettext-minimal)) + (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.") + (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