diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-01-06 16:52:11 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:23:48 +0100 |
| commit | 5050f87e59b8d2d8217c5aac64ec53e98e8eba5d (patch) | |
| tree | 92f32dd3e4852ce4d48354cc1b348a95e3f4f51e | |
| parent | 14dd2be4071265561b6773af8df3fe32091619fa (diff) | |
gnu: sugar: Switch to pyproject.
* gnu/packages/sugar.scm (sugar):
[arguments]<#:imported-modules, #:modules, #:phases>: Switch to
pyproject-build-system.
Change-Id: I91ebeb1506cbc0ab50d2ed38e890d34ed9abe8c2
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
| -rw-r--r-- | gnu/packages/sugar.scm | 131 |
1 files changed, 66 insertions, 65 deletions
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm index 98302c25c20..f91d73dd273 100644 --- a/gnu/packages/sugar.scm +++ b/gnu/packages/sugar.scm | |||
| @@ -74,74 +74,75 @@ | |||
| 74 | (list | 74 | (list |
| 75 | #:imported-modules | 75 | #:imported-modules |
| 76 | `(,@%glib-or-gtk-build-system-modules | 76 | `(,@%glib-or-gtk-build-system-modules |
| 77 | (guix build python-build-system)) | 77 | ,@%pyproject-build-system-modules) |
| 78 | #:modules | 78 | #:modules |
| 79 | `(((guix build python-build-system) #:prefix python:) | 79 | `(((guix build pyproject-build-system) #:prefix py:) |
| 80 | ,@%glib-or-gtk-build-system-default-modules) | 80 | ,@%glib-or-gtk-build-system-default-modules) |
| 81 | #:phases | 81 | #:phases |
| 82 | #~(modify-phases %standard-phases | 82 | (with-extensions (list (pyproject-guile-json)) |
| 83 | (add-after 'unpack 'patch-build-system | 83 | #~(modify-phases %standard-phases |
| 84 | (lambda _ | 84 | (add-after 'unpack 'patch-build-system |
| 85 | (substitute* "autogen.sh" | 85 | (lambda _ |
| 86 | (("^\"\\$srcdir/configure" m) | 86 | (substitute* "autogen.sh" |
| 87 | (string-append "#" m))) | 87 | (("^\"\\$srcdir/configure" m) |
| 88 | ;; This .po file does not exist | 88 | (string-append "#" m))) |
| 89 | (substitute* "po/LINGUAS" | 89 | ;; This .po file does not exist |
| 90 | (("^ig") "")))) | 90 | (substitute* "po/LINGUAS" |
| 91 | (add-after 'unpack 'fix-references | 91 | (("^ig") "")))) |
| 92 | (lambda* (#:key inputs #:allow-other-keys) | 92 | (add-after 'unpack 'fix-references |
| 93 | (substitute* "bin/sugar.in" | 93 | (lambda* (#:key inputs #:allow-other-keys) |
| 94 | (("exec python3") | 94 | (substitute* "bin/sugar.in" |
| 95 | (string-append "exec " (which "python3")))) | 95 | (("exec python3") |
| 96 | (substitute* "src/jarabe/main.py" | 96 | (string-append "exec " (which "python3")))) |
| 97 | (("'metacity'") | 97 | (substitute* "src/jarabe/main.py" |
| 98 | (string-append "'" (search-input-file inputs "/bin/metacity") "'")) | 98 | (("'metacity'") |
| 99 | (("'metacity-message") | 99 | (string-append "'" (search-input-file inputs "/bin/metacity") "'")) |
| 100 | (string-append "'" (search-input-file inputs "/bin/metacity-message")))) | 100 | (("'metacity-message") |
| 101 | (substitute* "src/jarabe/intro/window.py" | 101 | (string-append "'" (search-input-file inputs "/bin/metacity-message")))) |
| 102 | (("ssh-keygen") | 102 | (substitute* "src/jarabe/intro/window.py" |
| 103 | (search-input-file inputs "/bin/ssh-keygen")) | 103 | (("ssh-keygen") |
| 104 | ;; ssh-keygen no longer supports dsa. | 104 | (search-input-file inputs "/bin/ssh-keygen")) |
| 105 | (("-t dsa") "-t rsa")) | 105 | ;; ssh-keygen no longer supports dsa. |
| 106 | (substitute* "src/jarabe/journal/model.py" | 106 | (("-t dsa") "-t rsa")) |
| 107 | (("xdg-user-dir") | 107 | (substitute* "src/jarabe/journal/model.py" |
| 108 | (search-input-file inputs "/bin/xdg-user-dir"))) | 108 | (("xdg-user-dir") |
| 109 | (substitute* "extensions/cpsection/datetime/model.py" | 109 | (search-input-file inputs "/bin/xdg-user-dir"))) |
| 110 | (("/usr/share/zoneinfo/zone.tab") | 110 | (substitute* "extensions/cpsection/datetime/model.py" |
| 111 | (search-input-file inputs "/share/zoneinfo/zone.tab"))) | 111 | (("/usr/share/zoneinfo/zone.tab") |
| 112 | (substitute* "extensions/cpsection/modemconfiguration/model.py" | 112 | (search-input-file inputs "/share/zoneinfo/zone.tab"))) |
| 113 | (("/usr/share/zoneinfo/iso3166.tab") | 113 | (substitute* "extensions/cpsection/modemconfiguration/model.py" |
| 114 | (search-input-file inputs "/share/zoneinfo/iso3166.tab")) | 114 | (("/usr/share/zoneinfo/iso3166.tab") |
| 115 | (("/usr/share/mobile-broadband-provider-info") | 115 | (search-input-file inputs "/share/zoneinfo/iso3166.tab")) |
| 116 | (dirname | 116 | (("/usr/share/mobile-broadband-provider-info") |
| 117 | (search-input-file inputs | 117 | (dirname |
| 118 | "/share/mobile-broadband-provider-info/serviceproviders.xml")))) | 118 | (search-input-file inputs |
| 119 | (substitute* "extensions/cpsection/aboutcomputer/model.py" | 119 | "/share/mobile-broadband-provider-info/serviceproviders.xml")))) |
| 120 | (("ethtool") | 120 | (substitute* "extensions/cpsection/aboutcomputer/model.py" |
| 121 | (search-input-file inputs "/sbin/ethtool"))) | 121 | (("ethtool") |
| 122 | (substitute* "extensions/cpsection/language/model.py" | 122 | (search-input-file inputs "/sbin/ethtool"))) |
| 123 | (("'locale'") | 123 | (substitute* "extensions/cpsection/language/model.py" |
| 124 | (string-append "'" | 124 | (("'locale'") |
| 125 | (search-input-file inputs "/bin/locale") | 125 | (string-append "'" |
| 126 | "'"))) | 126 | (search-input-file inputs "/bin/locale") |
| 127 | ;; This is a global location on Guix System. Ideally we would | 127 | "'"))) |
| 128 | ;; have a search path here. | 128 | ;; This is a global location on Guix System. Ideally we would |
| 129 | (substitute* "extensions/cpsection/background/model.py" | 129 | ;; have a search path here. |
| 130 | (("\\('/usr', 'share', 'backgrounds'\\)") | 130 | (substitute* "extensions/cpsection/background/model.py" |
| 131 | "('/run', 'current-system', 'profile', 'share', 'backgrounds')")) | 131 | (("\\('/usr', 'share', 'backgrounds'\\)") |
| 132 | (substitute* "src/jarabe/view/viewhelp.py" | 132 | "('/run', 'current-system', 'profile', 'share', 'backgrounds')")) |
| 133 | (("/usr/share/sugar/activities/") | 133 | (substitute* "src/jarabe/view/viewhelp.py" |
| 134 | "/run/current-system/profile/share/sugar/activities/")))) | 134 | (("/usr/share/sugar/activities/") |
| 135 | (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap | 135 | "/run/current-system/profile/share/sugar/activities/")))) |
| 136 | (lambda* (#:key inputs outputs #:allow-other-keys) | 136 | (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap |
| 137 | (for-each | 137 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 138 | (lambda (executable) | 138 | (for-each |
| 139 | (wrap-program executable | 139 | (lambda (executable) |
| 140 | `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") | 140 | (wrap-program executable |
| 141 | ,(python:site-packages inputs outputs))) | 141 | `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") |
| 142 | `("GI_TYPELIB_PATH" prefix | 142 | ,(py:site-packages inputs outputs))) |
| 143 | (,(getenv "GI_TYPELIB_PATH"))))) | 143 | `("GI_TYPELIB_PATH" prefix |
| 144 | (find-files (string-append #$output "/bin") "^sugar.*"))))))) | 144 | (,(getenv "GI_TYPELIB_PATH"))))) |
| 145 | (find-files (string-append #$output "/bin") "^sugar.*")))))))) | ||
| 145 | (inputs | 146 | (inputs |
| 146 | (list bash-minimal | 147 | (list bash-minimal |
| 147 | ethtool | 148 | ethtool |
