gnu: meteo-qt: Switch to pyproject.

* gnu/packages/weather.scm (meteo-qt):
[build-system]: Switch to pyproject-build-system.
[arguments]: Relocate, improve style.
[native-inputs]: Add python-setuptools.
[description]: Improve style.

Change-Id: I1053de72536158860ecb0cf6edfda873a8743728
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-09-27 15:29:14 +02:00 committed by Sharlatan Hellseher
parent 8a24b7ee90
commit cf006b7f90
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -20,13 +20,14 @@
(define-module (gnu packages weather)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages golang-build)
#:use-module (gnu packages golang-xyz)
#:use-module (gnu packages python-build)
#:use-module (gnu packages qt)
#:use-module (gnu packages xml))
@ -65,30 +66,35 @@ precipitation amount and probability.")
(name "meteo-qt")
(version "4.2")
(source
(origin (method git-fetch)
(uri (git-reference (url "https://github.com/dglent/meteo-qt")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1cvmh5rq50dncd2fmp4amjb2hhl2mryb2ywg0zdzhz89dkjq0kdk"))))
(build-system python-build-system)
(native-inputs (list python-pyqt-6))
(propagated-inputs (list python-lxml python-pyqt-6 python-sip))
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/dglent/meteo-qt")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1cvmh5rq50dncd2fmp4amjb2hhl2mryb2ywg0zdzhz89dkjq0kdk"))))
(build-system pyproject-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(add-before 'build 'remove-translations
(lambda _
;; Translation processing is broken because Guix thinks lprodump
;; is in qtbase, not qttools. So, we'll skip it and exclude
;; qttools from the native input list until it is fixed.
(substitute* "setup.py"
(("/usr") #$output)
(("^.+lrelease-pro-qt6.+$") "")
(("^.+meteo_qt/translations.+$") "")))))))
(list
#:tests? #f ; No tests.
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'remove-translations
(lambda _
;; Translation processing is broken because Guix thinks lprodump
;; is in qtbase, not qttools. So, we'll skip it and exclude
;; qttools from the native input list until it is fixed.
(substitute* "setup.py"
(("/usr") #$output)
(("^.+lrelease-pro-qt6.+$") "")
(("^.+meteo_qt/translations.+$") "")))))))
(native-inputs (list python-pyqt-6 python-setuptools))
(propagated-inputs (list python-lxml python-pyqt-6 python-sip))
(home-page "https://github.com/dglent/meteo-qt")
(synopsis "Weather application for the system tray")
(description "meteo-qt is an application to display weather information in
desktop panels, desktop notifictions and its own window. Weather information is
(description
"meteo-qt is an application to display weather information in desktop
panels, desktop notifictions and its own window. Weather information is
retrieved from OpenWeatherMap.")
(license license:gpl3)))