mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: onionshare-cli: Update to 2.5.
* gnu/packages/tor.scm (onionshare-cli): Update to 2.5. [phases]: Use gexps. {bake-tor}: Use search-input-file and search-input-directory.
This commit is contained in:
parent
8d922504b2
commit
b54a243ec1
1 changed files with 33 additions and 32 deletions
|
@ -246,16 +246,16 @@ networks.")
|
||||||
(define-public onionshare-cli
|
(define-public onionshare-cli
|
||||||
(package
|
(package
|
||||||
(name "onionshare-cli")
|
(name "onionshare-cli")
|
||||||
(version "2.4")
|
(version "2.5")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/micahflee/onionshare")
|
(url "https://github.com/micahflee/onionshare")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "157ryxm4p1q7b3nj32v9fziw1li6s6s203b7ll80js14cbp6dj9d"))))
|
(base32 "16m5ll0v0qjbirwwzbzxg53kq4ry1n3ay5x0h8zkij73v3x0q864"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-pytest))
|
(list python-pytest))
|
||||||
|
@ -277,29 +277,30 @@ networks.")
|
||||||
python-urllib3
|
python-urllib3
|
||||||
tor))
|
tor))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-after 'unpack 'bake-tor
|
#~(modify-phases %standard-phases
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(add-after 'unpack 'bake-tor
|
||||||
(substitute* (list "cli/onionshare_cli/common.py"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
"desktop/src/onionshare/gui_common.py")
|
(substitute* (list "cli/onionshare_cli/common.py"
|
||||||
(("shutil\\.which\\(\\\"tor\\\"\\)")
|
"desktop/onionshare/gui_common.py")
|
||||||
(string-append "\"" (which "tor") "\"")))
|
(("shutil\\.which\\(\\\"tor\\\"\\)")
|
||||||
(substitute* "cli/tests/test_cli_common.py"
|
(format #f "~s" (search-input-file inputs "bin/tor"))))
|
||||||
(("/usr/share/tor")
|
(substitute* "cli/tests/test_cli_common.py"
|
||||||
(string-append (assoc-ref inputs "tor") "/share/tor")))))
|
(("/usr/share/tor")
|
||||||
(add-before 'build 'change-directory
|
(search-input-directory inputs "share/tor")))))
|
||||||
(lambda _ (chdir "cli")))
|
(add-before 'build 'change-directory
|
||||||
(replace 'check
|
(lambda _ (chdir "cli")))
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(replace 'check
|
||||||
(when tests?
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(setenv "HOME" "/tmp")
|
(when tests?
|
||||||
;; Greendns is not needed for testing, and if eventlet tries to
|
(setenv "HOME" "/tmp")
|
||||||
;; load it, an OSError is thrown when getprotobyname is called.
|
;; Greendns is not needed for testing, and if eventlet tries to
|
||||||
;; Thankfully there is an environment variable to disable the
|
;; load it, an OSError is thrown when getprotobyname is called.
|
||||||
;; greendns import, so use it:
|
;; Thankfully there is an environment variable to disable the
|
||||||
(setenv "EVENTLET_NO_GREENDNS" "yes")
|
;; greendns import, so use it:
|
||||||
(invoke "pytest" "-v" "./tests")))))))
|
(setenv "EVENTLET_NO_GREENDNS" "yes")
|
||||||
|
(invoke "pytest" "-v" "./tests")))))))
|
||||||
(home-page "https://onionshare.org/")
|
(home-page "https://onionshare.org/")
|
||||||
(synopsis "Securely and anonymously share files")
|
(synopsis "Securely and anonymously share files")
|
||||||
(description "OnionShare lets you securely and anonymously share files,
|
(description "OnionShare lets you securely and anonymously share files,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue