@@ -1212,21 +1212,21 @@ (define-public ledger-agent
(define-public trezor-agent
(package
(name "trezor-agent")
- (version "0.14.4")
+ ;; There are multiple Python apps/packages in the same git repo. The git
+ ;; tag seems to track libagent's version (which is called
+ ;; python-trezor-agent in the Guix namespace). Currently trezor-agent's
+ ;; version is set in `agents/trezor/setup.py` to a different value than
+ ;; libagent, but as discussed with upstream in issue
+ ;; https://github.com/romanz/trezor-agent/issues/369, we are copying our
+ ;; version from that of libagent.
+ (version (package-version python-trezor-agent))
(source
(origin
(method git-fetch)
- (uri (git-reference
- (url "https://github.com/romanz/trezor-agent")
- ;; The version mismatch is not a mistake. Multiple Python
- ;; apps/packages are in the same git repo, and they have
- ;; different versions. The git tag seems to track libagent,
- ;; i.e. python-trezor-agent in the Guix namespace. See
- ;; e.g. ./agents/trezor/setup.py.
- (commit "v0.14.4")))
+ (uri (origin-uri (package-source python-trezor-agent)))
(file-name (git-file-name name version))
(sha256
- (base32 "1ksv494xpga27ifrjyn1bkqaya5h769lqb9rx1ng0n4kvmnrqr3l"))
+ (base32 "0pjlsig2gd4m10xkfpa01fr9jswqn0s3qa7l7wgfv5714x33dimm"))
(modules
'((guix build utils)
(ice-9 ftw)
@@ -1245,7 +1245,10 @@ (define-public trezor-agent
(string-append "./" file-name)))
(scandir "./agents/trezor/"
(negate (cut member <> '("." "..") string=))))
- (delete-file-recursively "./agents")))))
+ (delete-file-recursively "./agents")
+ ;; Without deleting libagent setuptools complains as follows:
+ ;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
+ (delete-file-recursively "./libagent")))))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -1274,8 +1277,10 @@ (define-public trezor-agent
(build-system python-build-system)
(inputs
(list python-trezor python-trezor-agent))
- (native-inputs
- (list python-attrs))
+ (native-inputs ; Only needed for running the tests
+ (list python-attrs
+ python-bech32
+ python-simple-rlp))
(home-page "https://github.com/romanz/trezor-agent")
(synopsis "Using Trezor as hardware SSH/GPG agent")
(description "This package allows using Trezor as a hardware SSH/GPG