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,45 +256,40 @@ 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
;; been added and the software was renamed to nyx.
(let ((commit "fea209127484d9b304b908a4711c9528b1d065bc")
(revision "1")) ; Guix package revision
(package (package
(name "nyx") (name "nyx")
(version (string-append "1.9-" (version "2.0.4")
revision "." (string-take commit 7)))
(source (source
(origin (origin
(method git-fetch) (method url-fetch)
(file-name (string-append name "-" version "-checkout")) (uri (pypi-uri name version))
(uri (git-reference
(url "https://git.torproject.org/nyx.git")
(commit commit)))
(sha256 (sha256
(base32 (base32
"1g0l4988076xg5gs0x0nxzlg58rfx5g5agmklvyh4yp03vxncdb9")))) "0pm7vfcqr02pzqz4b2f6sw5prxxmgqwr1912am42xmy2i53n7nrq"))))
(build-system python-build-system) (build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)
("python-pep8" ,python-pep8)
("python-pyflakes" ,python-pyflakes)))
(inputs (inputs
`(("python-stem" ,python-stem))) `(("python-stem" ,python-stem)))
(arguments (arguments
`(#:configure-flags `(#:phases
(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 (modify-phases %standard-phases
(replace 'check (add-after 'install 'install-man-page
(lambda _ (lambda* (#:key outputs #:allow-other-keys)
(invoke "./run_tests.py" "--unit")))))) (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/") (home-page "https://nyx.torproject.org/")
(synopsis "Tor relay status monitor") (synopsis "Tor relay status monitor")
(description (description
@ -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+)))