diff options
author | Nicolas Graves <ngraves@ngraves.fr> | 2025-04-06 14:37:21 +0200 |
---|---|---|
committer | Andreas Enge <andreas@enge.fr> | 2025-04-16 11:46:32 +0200 |
commit | 239c9d829d6360d8c58ce84a66054cd09617d67e (patch) | |
tree | 7c0b3fa0a3a98d976a0d564ee0c24dcb1cbf5877 | |
parent | 13a2c019c27f871eb8e801d48cf6a6a5596a3f32 (diff) | |
download | guix-239c9d829d6360d8c58ce84a66054cd09617d67e.tar.gz guix-239c9d829d6360d8c58ce84a66054cd09617d67e.zip |
gnu: bpytop: Switch to pyproject-build-system.
* gnu/packages/admin.scm (bpytop)
[build-system]: Switch to pyproject.
[arguments]{tests?}: Disable tests.
{phases}: Add phase 'use-poetry-core. Improve phase 'install-theme.
[native-inputs]: Add python-poetry-core.
Change-Id: Ib671bb71c3f920b9e134554628b16a8e8968500b
Signed-off-by: Steve George <steve@futurile.net>
-rw-r--r-- | gnu/packages/admin.scm | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 9fe6f63c66..5eeb15090a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1065,25 +1065,29 @@ memory, disks, network and processes.") (uri (pypi-uri "bpytop" version)) (sha256 (base32 "1clvajbv7pzlya9s1xs6dvjic8rv3kx7aqiwnjxapiypx246gdjk")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ; No tests in Pypi archive. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-poetry-core + (lambda _ + ;; Patch to use the core poetry API. + (substitute* "pyproject.toml" + (("poetry.masonry.api") + "poetry.core.masonry.api")))) + (add-after 'install 'install-themes + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((themes (string-append (site-packages inputs outputs) + "/bpytop-themes"))) + (mkdir-p themes) + (copy-recursively "themes" themes))))))) (inputs (list python-psutil)) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; sanity-check phase fail, but the application seems to be working - (delete 'sanity-check) - (add-after 'install 'install-themes - (lambda* (#:key outputs #:allow-other-keys) - (let ((themes (string-append (assoc-ref outputs "out") - "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages/bpytop-themes"))) - (mkdir-p themes) - (copy-recursively "themes" themes))))))) - (home-page - "https://github.com/aristocratos/bpytop") + (native-inputs + (list python-poetry-core)) + (home-page "https://github.com/aristocratos/bpytop") (synopsis "Resource monitor") (description "Resource monitor that shows usage and stats for processor, memory, disks, network and processes. It's a Python port and continuation of |