mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: trezor-agent: Update to 0.15.0.
* gnu/packages/finance.scm (trezor-agent): Update to 0.15.0. [source]<snippet>: Refresh it. [build-system]: Switch to pyproject-build-system. [arguments]<#:tests?>: Explicitely disable them. <#:phases>: Remove phase 'relax-requirements. [native-inputs]: Add python-setuptools, python-wheel. [description]: Improve style. Change-Id: I5c9f4782c96990931559a71bb896e056741e5fc3 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
9f10fbdbce
commit
c50af26f31
1 changed files with 24 additions and 29 deletions
|
@ -1348,7 +1348,7 @@ the KeepKey Hardware Wallet.")
|
||||||
(uri (origin-uri (package-source python-trezor-agent)))
|
(uri (origin-uri (package-source python-trezor-agent)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))
|
(base32 "09y55ys3x5krszh58yhl5gpdri0zrlhfld6psrmiyxfbp344asin"))
|
||||||
(modules
|
(modules
|
||||||
'((guix build utils)
|
'((guix build utils)
|
||||||
(ice-9 ftw)
|
(ice-9 ftw)
|
||||||
|
@ -1368,45 +1368,40 @@ the KeepKey Hardware Wallet.")
|
||||||
(scandir "./agents/trezor/"
|
(scandir "./agents/trezor/"
|
||||||
(negate (cut member <> '("." "..") string=))))
|
(negate (cut member <> '("." "..") string=))))
|
||||||
(delete-file-recursively "./agents")
|
(delete-file-recursively "./agents")
|
||||||
;; Without deleting ./contrib the sanity-check phase fails. Reported
|
|
||||||
;; upstream as https://github.com/romanz/trezor-agent/issues/429.
|
|
||||||
(delete-file-recursively "./contrib")
|
|
||||||
;; Without deleting ./libagent setuptools complains as follows:
|
;; Without deleting ./libagent setuptools complains as follows:
|
||||||
;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
|
;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
|
||||||
(delete-file-recursively "./libagent")))))
|
(delete-file-recursively "./libagent")))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:tests? #f ; No tests there.
|
||||||
(add-after 'unpack 'relax-requirements
|
#:phases
|
||||||
(lambda _
|
#~(modify-phases %standard-phases
|
||||||
(substitute* "setup.py"
|
(add-after 'wrap 'fixup-agent-py
|
||||||
(("'trezor\\[hidapi]>=0.12.0,<0.13'")
|
(lambda _
|
||||||
"'trezor[hidapi]>=0.13'"))))
|
;; The wrap phase also wraps trezor_agent.py (besides the public
|
||||||
(add-after 'wrap 'fixup-agent-py
|
;; facing executable called trezor-agent). We need to undo that
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
;; wrapping. The reason this is needed is that the python easy
|
||||||
(let* ((out (assoc-ref outputs "out")))
|
;; install generates a toplevel script (?) that messes with
|
||||||
;; The wrap phase also wraps trezor_agent.py (besides the
|
;; argv[0] and then re-opens the python module. This fails when
|
||||||
;; public facing executable called trezor-agent). We need to
|
;; the wrapped file is actually a shell script, not a python file.
|
||||||
;; undo that wrapping. The reason this is needed is that the
|
(delete-file
|
||||||
;; python easy install generates a toplevel script (?) that
|
(string-append #$output "/bin/.trezor_agent.py-real"))
|
||||||
;; messes with argv[0] and then re-opens the python
|
;; Overwrite the wrapped one with the real thing.
|
||||||
;; module. This fails when the wrapped file is actually a shell
|
(install-file "./trezor_agent.py"
|
||||||
;; script, not a python file.
|
(string-append #$output "/bin")))))))
|
||||||
(delete-file (string-append out "/bin/.trezor_agent.py-real"))
|
|
||||||
;; Overwrite the wrapped one with the real thing.
|
|
||||||
(install-file "./trezor_agent.py"
|
|
||||||
(string-append out "/bin"))))))))
|
|
||||||
(build-system python-build-system)
|
|
||||||
(inputs
|
(inputs
|
||||||
(list python-trezor python-trezor-agent))
|
(list python-trezor python-trezor-agent))
|
||||||
(native-inputs ; Only needed for running the tests
|
(native-inputs ; Only needed for running the tests
|
||||||
(list python-attrs
|
(list python-attrs
|
||||||
python-bech32
|
python-bech32
|
||||||
python-simple-rlp))
|
python-simple-rlp
|
||||||
|
python-setuptools
|
||||||
|
python-wheel))
|
||||||
(home-page "https://github.com/romanz/trezor-agent")
|
(home-page "https://github.com/romanz/trezor-agent")
|
||||||
(synopsis "Using Trezor as hardware SSH/GPG agent")
|
(synopsis "Using Trezor as hardware SSH/GPG agent")
|
||||||
(description "This package allows using Trezor as a hardware SSH/GPG
|
(description
|
||||||
agent.")
|
"This package allows using Trezor as a hardware SSH/GPG agent.")
|
||||||
(license license:lgpl3)))
|
(license license:lgpl3)))
|
||||||
|
|
||||||
(define-public keepkey-agent
|
(define-public keepkey-agent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue