gnu: nyx: Switch to pyproject.

* gnu/packages/tor.scm (nyx):
[build-system]: Switch to pyproject-build-system.
[arguments]<#:test-backend>: Set it.
<#:phases>: Refresh them, improve style.
[native-inputs]: Add python-setuptools.
This commit is contained in:
Nicolas Graves 2025-12-22 01:06:08 +01:00 committed by Sharlatan Hellseher
parent ff65305ea7
commit f8c7cd1b1d
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -438,32 +438,24 @@ host websites, and chat with friends using the Tor network.")))
(method url-fetch) (method url-fetch)
(uri (pypi-uri name version)) (uri (pypi-uri name version))
(sha256 (sha256
(base32 (base32 "02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8"))))
"02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8")))) (build-system pyproject-build-system)
(build-system python-build-system)
(inputs
(list python-stem))
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-backend #~'unittest
(add-after 'install 'install-man-page #:phases
(lambda* (#:key outputs #:allow-other-keys) #~(modify-phases %standard-phases
(let* ((out (assoc-ref outputs "out")) (add-after 'install 'install-man-page
(man (string-append out "/share/man"))) (lambda _
(install-file "nyx.1" (string-append man "/man1")) (install-file "nyx.1"
#t))) (string-append #$output "/share/man/man1"))))
(add-after 'install 'install-sample-configuration (add-after 'install 'install-sample-configuration
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (install-file "web/nyxrc.sample"
(doc (string-append out "/share/doc/" ,name "-" ,version))) (string-append #$output "/share/doc/"
(install-file "web/nyxrc.sample" doc) #$name "-" #$version)))))))
#t)))) (native-inputs (list python-setuptools))
;; XXX The tests seem to require more of a real terminal than the build (inputs (list python-stem))
;; environment provides:
;; _curses.error: setupterm: could not find terminal
;; With TERM=linux, the tests try to move the cursor and still fail:
;; _curses.error: cbreak() returned ERR
#:tests? #f))
(home-page "https://nyx.torproject.org/") (home-page "https://nyx.torproject.org/")
(synopsis "Tor relay status monitor") (synopsis "Tor relay status monitor")
(description (description