Archived
1
0
Fork 0

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

View file

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