gnu: nyx: Update to 2.0.4.

* gnu/packages/tor.scm (nyx): Update to 2.0.4.
[source]: Use proper PYPI-URI release tarball.
[native-inputs]: Remove (possibly outdated) test dependencies for now.
[arguments]: Remove no-longer-supported #:configure-flags, adding new
‘install-man-page’ and ‘install-sample-configuration’ phases.
Use setuptools. Disable tests.
This commit is contained in:
Tobias Geerinckx-Rice 2018-06-21 00:33:13 +02:00
parent b544dde3e7
commit 18ab54d4a2
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 39 additions and 44 deletions

View File

@ -256,49 +256,44 @@ from you.")
license:bsd-3)))) ; onionshare/socks.py
(define-public nyx
;; The last arm relase was 5 years ago. Meanwhile, python3 support has
;; been added and the software was renamed to nyx.
(let ((commit "fea209127484d9b304b908a4711c9528b1d065bc")
(revision "1")) ; Guix package revision
(package
(name "nyx")
(version (string-append "1.9-"
revision "." (string-take commit 7)))
(source
(origin
(method git-fetch)
(file-name (string-append name "-" version "-checkout"))
(uri (git-reference
(url "https://git.torproject.org/nyx.git")
(commit commit)))
(sha256
(base32
"1g0l4988076xg5gs0x0nxzlg58rfx5g5agmklvyh4yp03vxncdb9"))))
(build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)
("python-pep8" ,python-pep8)
("python-pyflakes" ,python-pyflakes)))
(inputs
`(("python-stem" ,python-stem)))
(arguments
`(#:configure-flags
(list (string-append "--man-page="
(assoc-ref %outputs "out")
"/share/man/man1/nyx.1")
(string-append "--sample-path="
(assoc-ref %outputs "out")
"/share/doc/nyx/nyxrc.sample"))
#:use-setuptools? #f ; setup.py still uses distutils
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "./run_tests.py" "--unit"))))))
(home-page "https://nyx.torproject.org/")
(synopsis "Tor relay status monitor")
(description
"Nyx monitors the performance of relays participating in the
(package
(name "nyx")
(version "2.0.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri name version))
(sha256
(base32
"0pm7vfcqr02pzqz4b2f6sw5prxxmgqwr1912am42xmy2i53n7nrq"))))
(build-system python-build-system)
(inputs
`(("python-stem" ,python-stem)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'install-man-page
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man")))
(install-file "nyx.1" (string-append man "/man1"))
#t)))
(add-after 'install 'install-sample-configuration
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(doc (string-append out "/share/doc/" ,name "-" ,version)))
(install-file "web/nyxrc.sample" doc)
#t))))
;; XXX The tests seem to require more of a real terminal than the build
;; 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/")
(synopsis "Tor relay status monitor")
(description
"Nyx monitors the performance of relays participating in the
@uref{https://www.torproject.org/, Tor anonymity network}. It displays this
information visually and in real time, using a curses-based terminal interface.
This makes Nyx well-suited for remote shell connections and servers without a
@ -314,4 +309,4 @@ statistics and status reports on:
@end enumerate
Potential client and exit connections are scrubbed of sensitive information.")
(license license:gpl3+))))
(license license:gpl3+)))