summaryrefslogtreecommitdiff
path: root/gnu/packages/tor.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/tor.scm')
-rw-r--r--gnu/packages/tor.scm62
1 files changed, 31 insertions, 31 deletions
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 2507f80c74..3cd7983827 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -227,7 +227,7 @@ networks.")
(define-public onionshare-cli
(package
(name "onionshare-cli")
- (version "2.3.2")
+ (version "2.4")
(source
(origin
(method git-fetch)
@@ -236,7 +236,7 @@ networks.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1qk0zvbaws9md1lmi0al1jc8v86l65nf7n3w1s36iwsfzazc6clv"))))
+ (base32 "157ryxm4p1q7b3nj32v9fziw1li6s6s203b7ll80js14cbp6dj9d"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -248,6 +248,7 @@ networks.")
("python-flask" ,python-flask)
("python-flask-httpauth" ,python-flask-httpauth)
("python-flask-socketio" ,python-flask-socketio)
+ ("python-pynacl" ,python-pynacl)
("python-psutil" ,python-psutil)
("python-pycryptodome" ,python-pycryptodome)
("python-pysocks" ,python-pysocks)
@@ -265,18 +266,21 @@ networks.")
"desktop/src/onionshare/gui_common.py")
(("shutil\\.which\\(\\\"tor\\\"\\)")
(string-append "\"" (which "tor") "\"")))
- #t))
+ (substitute* "cli/tests/test_cli_common.py"
+ (("/usr/share/tor")
+ (string-append (assoc-ref inputs "tor") "/share/tor")))))
(add-before 'build 'change-directory
- (lambda _ (chdir "cli") #t))
+ (lambda _ (chdir "cli")))
(replace 'check
- (lambda _
- (setenv "HOME" "/tmp")
- ;; Greendns is not needed for testing, and if eventlet tries to
- ;; load it, an OSError is thrown when getprotobyname is called.
- ;; Thankfully there is an environment variable to disable the
- ;; greendns import, so use it:
- (setenv "EVENTLET_NO_GREENDNS" "yes")
- (invoke "pytest" "-v" "./tests"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ ;; Greendns is not needed for testing, and if eventlet tries to
+ ;; load it, an OSError is thrown when getprotobyname is called.
+ ;; Thankfully there is an environment variable to disable the
+ ;; greendns import, so use it:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")
+ (invoke "pytest" "-v" "./tests")))))))
(home-page "https://onionshare.org/")
(synopsis "Securely and anonymously share files")
(description "OnionShare lets you securely and anonymously share files,
@@ -295,7 +299,7 @@ OnionShare.")
((#:phases phases)
`(modify-phases ,phases
(replace 'change-directory
- (lambda _ (chdir "desktop/src") #t))
+ (lambda _ (chdir "desktop/src")))
(add-after 'unpack 'patch-tests
(lambda _
;; Disable tests that require starting servers, which will hang
@@ -335,22 +339,19 @@ OnionShare.")
(display line out)
(loop))))))))))
(replace 'check
- (lambda _
- ;; Some tests need a writable homedir:
- (setenv "HOME" "/tmp")
- ;; Ensure installed modules can be found:
- (setenv "PYTHONPATH"
- (string-append %output "/lib/python"
- ,(version-major+minor (package-version python))
- "/site-packages:"
- (getenv "PYTHONPATH")))
- ;; Avoid `getprotobyname` issues:
- (setenv "EVENTLET_NO_GREENDNS" "yes")
- ;; Make Qt render "offscreen":
- (setenv "QT_QPA_PLATFORM" "offscreen")
- ;; Must be run from "desktop" dir:
- (chdir "..")
- (invoke "./tests/run.sh")))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ ;; Some tests need a writable homedir:
+ (setenv "HOME" "/tmp")
+ ;; Ensure installed modules can be found:
+ (add-installed-pythonpath inputs outputs)
+ ;; Avoid `getprotobyname` issues:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")
+ ;; Make Qt render "offscreen":
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ ;; Must be run from "desktop" dir:
+ (with-directory-excursion ".."
+ (invoke "./tests/run.sh")))))
(add-after 'install 'install-data
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -358,8 +359,7 @@ OnionShare.")
(install-file "org.onionshare.OnionShare.svg"
(string-append share "/icons/hicolor/scalable/apps"))
(install-file "org.onionshare.OnionShare.desktop"
- (string-append share "/applications"))
- #t)))))))
+ (string-append share "/applications")))))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(inputs