[PATCH 1/4] gnu: Add python-simple-rlp.

  • Done
  • quality assurance status badge
Details
2 participants
  • Attila Lendvai
  • Christopher Baines
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 11 Oct 2022 15:10
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221011131002.28153-1-attila@lendvai.name
* gnu/packages/python-xyz.scm (python-simple-rlp): New variable
---
this patch series updates the trezor tools.


gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c369362dc7..f038e912db 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2850,6 +2850,30 @@ (define-public python-simplejson
Python 3.3+.")
(license license:x11)))
+(define-public python-simple-rlp
+ (package
+ (name "python-simple-rlp")
+ (version "0.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SamuelHaidu/simple-rlp")
+ ;; Upstream doesn't tag the git repo.
+ (commit "342ea269d84da1ddc4a7630cdebc90159261391c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nv92sphpkyrncak4qgj50qmgkmj4ycl2szbnv9c7ihgl5df4div"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/SamuelHaidu/simple-rlp")
+ (synopsis
+ "Python implementation of RLP (Recursive Length Prefix encoding)")
+ (description
+ "@code{simple-rlp} is a python implementation of RLP (Recursive Length \
+Prefix) - Encode and decode data structures.")
+ ;; TODO not vanilla MIT: https://github.com/SamuelHaidu/simple-rlp/issues/1
+ (license license:expat)))
(define-public python-pyicu
(package
--
2.35.1
A
A
Attila Lendvai wrote on 11 Oct 2022 15:12
[PATCH 2/4] gnu: python-trezor: Update to 0.13.3.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221011131243.28391-2-attila@lendvai.name
Also disable the sanity-check phase.
---
gnu/packages/finance.scm | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index ac19851a85..340e56036d 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1048,7 +1048,7 @@ (define-public python-btchip-python
(define-public python-trezor
(package
(name "python-trezor")
- (version "0.13.0")
+ (version "0.13.3")
(source
(origin
(method git-fetch)
@@ -1057,7 +1057,7 @@ (define-public python-trezor
(commit (string-append "python/v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1wy584bxx5p2av4lv1bx9hl1q0b5n7hqz0hnqb9shjriarvl5ckd"))
+ (base32 "18qbdypi780b2s933dp7msh9m17mx9nq6qxn87jkwlf4i94h1vr2"))
(modules
'((guix build utils)
(srfi srfi-26)
@@ -1083,10 +1083,7 @@ (define-public python-trezor
(build-system python-build-system)
(propagated-inputs
(list python-attrs
- ;; TOOD: Use the latest click version after release 0.13.1 or later
- ;; is made (see:
- ;; https://github.com/trezor/trezor-firmware/issues/2199).
- python-click-7
+ python-click
python-construct
python-ecdsa
python-hidapi
@@ -1099,9 +1096,17 @@ (define-public python-trezor
(list protobuf
python-black
python-isort
+ python-pillow
python-protobuf
python-pyqt
- python-pytest))
+ python-pytest
+ python-simple-rlp))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; This package only has a Python script, not a Python module, so the
+ ;; sanity-check phase can't work.
+ (delete 'sanity-check))))
(home-page "https://github.com/trezor/python-trezor")
(synopsis "Python library for communicating with TREZOR Hardware Wallet")
(description "@code{trezor} is a Python library for communicating with
--
2.35.1
A
A
Attila Lendvai wrote on 11 Oct 2022 15:12
[PATCH 3/4] gnu: Add python-bech32.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221011131243.28391-3-attila@lendvai.name
---
gnu/packages/finance.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 340e56036d..22b6855519 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -900,6 +900,23 @@ (define-public monero-gui
the Monero GUI client.")
(license license:bsd-3)))
+(define-public python-bech32
+ (package
+ (name "python-bech32")
+ (version "1.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "bech32" version))
+ (sha256
+ (base32
+ "16fq5cfy5id9hp123ylhpl55pf38xwk0hv7sziqpig838qhvhvbx"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/fiatjaf/bech32")
+ (synopsis "Reference implementation for Bech32 and Segwit addresses")
+ (description "This package provides a python reference implementation
+for Bech32 and segwit addresses.")
+ (license license:expat)))
+
(define-public python-trezor-agent
;; It is called 'libagent' in pypi; i.e. this is the library as opposed to
;; the toplevel app called trezor-agent.
--
2.35.1
A
A
Attila Lendvai wrote on 11 Oct 2022 15:12
[PATCH 4/4] gnu: python-trezor-agent: Update to 0.14.5.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221011131243.28391-4-attila@lendvai.name
---
gnu/packages/finance.scm | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 22b6855519..f9dab9c16c 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -922,7 +922,7 @@ (define-public python-trezor-agent
;; the toplevel app called trezor-agent.
(package
(name "python-trezor-agent")
- (version "0.14.4")
+ (version "0.14.5")
(source
(origin
(method git-fetch)
@@ -931,7 +931,7 @@ (define-public python-trezor-agent
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1ksv494xpga27ifrjyn1bkqaya5h769lqb9rx1ng0n4kvmnrqr3l"))))
+ (base32 "1syg5an5hj8sr56hvcr45y8dymwy8va5h0pfyrmsnxcz8z5q1124"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -959,8 +959,12 @@ (define-public python-trezor-agent
python-semver
python-unidecode
python-wheel))
- (native-inputs
- (list gnupg python-mock python-pytest))
+ (native-inputs ; Only needed for running the tests
+ (list gnupg
+ python-bech32
+ python-cryptography
+ python-mock
+ python-pytest))
(home-page "https://github.com/romanz/trezor-agent")
(synopsis "Use hardware wallets as SSH and GPG agent")
(description
@@ -1243,8 +1247,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
--
2.35.1
C
C
Christopher Baines wrote on 6 Dec 2022 12:18
(name . Attila Lendvai)(address . attila@lendvai.name)
87ilion571.fsf@cbaines.net
Hi Attila,

Apologies it's taken so long to look at these patches.

I've gone ahead and pushed the two patches adding new packages.

I had a look at the changes to the trezor related packages. I wonder if
python-simple-rlp should be a propagated input for any packages? That
might avoid specifying it as an input to trezor-agent.

Also, it would be good to have any changes to trezor-agent in a separate
commit if they're needed.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmOPJvJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XeE+RAAjOsfQ8NbjZR9sk2yV+Q3+NV7q9CPksvj
1dpMb1G/s+nZGHFnEk48uliFG7CttnNNJk48ZMhsbzU1JIRR+Hww3M1aenC1OVA5
xMjp1zAi/JKEHgwNbHA7E8M9dyXRgi+sLBkIcWVnaroH2KWXfKU86WS2zZlIwHY2
zhx80vnYELiONtPCR2h7CLC9mks6UsMuAjoKBxF7AX52IDF6kwNgk4CDNOjE8+Ug
EpbvFox76fvKRmXl8Z6nkwlz3Xt6pHc/dzatyjhx57ikm4kRx0rDE3QOQvsJ/Cta
1UJZK/ip1Z+iKTSyj0SdBMiYW7UEL7Plpycc0OLCbFrxkUKE8GbS2K8j45N22WiO
K0+zdPoiIQoXejbVW7nWwE/6Pp4Gwad2YiUqPfQhRtiRReL7O0+OA1HUmkAtxear
pFF5erVeYzru+ADwfSNo41702A16Y3JpeU3yVLVkv5LIXXNFh+eXHxPSwHVRpCny
I3kqWcczhK9udLIjNtv/25zFz+3S1KpUUFSs7BbGS0tZsbMCwSun6Zydj7JgnbAb
SD9WxOweSCPUOlgwWsqsrB7YZEeV8uKL906lSA0cnVuIcE47xe3r1MCtXONewkVn
0qtx/QSfoIJwLLeEA5CuRqmkr64ba4mo5WbJuWPqJR1D7Dj2b+m4HOCBEMG/8Hzp
svTqUVNUV38=
=SXOK
-----END PGP SIGNATURE-----

A
A
Attila Lendvai wrote on 6 Dec 2022 19:04
[PATCH 1/2 v2] gnu: python-trezor: Update to 0.13.3.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221206180425.26026-1-attila@lendvai.name
Also disable the sanity-check phase.
---

the sanity-check removal is in the same commit, because it became
needed due to the version update.

gnu/packages/finance.scm | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index cc2d417003..287ee38041 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1054,7 +1054,7 @@ (define-public python-btchip-python
(define-public python-trezor
(package
(name "python-trezor")
- (version "0.13.0")
+ (version "0.13.3")
(source
(origin
(method git-fetch)
@@ -1063,7 +1063,7 @@ (define-public python-trezor
(commit (string-append "python/v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1wy584bxx5p2av4lv1bx9hl1q0b5n7hqz0hnqb9shjriarvl5ckd"))
+ (base32 "18qbdypi780b2s933dp7msh9m17mx9nq6qxn87jkwlf4i94h1vr2"))
(modules
'((guix build utils)
(srfi srfi-26)
@@ -1089,10 +1089,7 @@ (define-public python-trezor
(build-system python-build-system)
(propagated-inputs
(list python-attrs
- ;; TOOD: Use the latest click version after release 0.13.1 or later
- ;; is made (see:
- ;; https://github.com/trezor/trezor-firmware/issues/2199).
- python-click-7
+ python-click
python-construct
python-ecdsa
python-hidapi
@@ -1100,14 +1097,21 @@ (define-public python-trezor
python-mnemonic
python-requests
python-typing-extensions))
- (native-inputs
- ;; For tests.
+ (native-inputs ; Only needed for running the tests
(list protobuf
python-black
python-isort
+ python-pillow
python-protobuf
python-pyqt
- python-pytest))
+ python-pytest
+ python-simple-rlp))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; This package only has a Python script, not a Python module, so the
+ ;; sanity-check phase can't work.
+ (delete 'sanity-check))))
(home-page "https://github.com/trezor/python-trezor")
(synopsis "Python library for communicating with TREZOR Hardware Wallet")
(description "@code{trezor} is a Python library for communicating with
--
2.35.1
A
A
Attila Lendvai wrote on 6 Dec 2022 19:46
[PATCH 1/3 v3] gnu: python-trezor: Update to 0.13.3.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221206184607.8128-1-attila@lendvai.name
Also disable the sanity-check phase.
---

this series updates and fixes trezor support.

gnu/packages/finance.scm | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index cc2d417003..287ee38041 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1054,7 +1054,7 @@ (define-public python-btchip-python
(define-public python-trezor
(package
(name "python-trezor")
- (version "0.13.0")
+ (version "0.13.3")
(source
(origin
(method git-fetch)
@@ -1063,7 +1063,7 @@ (define-public python-trezor
(commit (string-append "python/v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1wy584bxx5p2av4lv1bx9hl1q0b5n7hqz0hnqb9shjriarvl5ckd"))
+ (base32 "18qbdypi780b2s933dp7msh9m17mx9nq6qxn87jkwlf4i94h1vr2"))
(modules
'((guix build utils)
(srfi srfi-26)
@@ -1089,10 +1089,7 @@ (define-public python-trezor
(build-system python-build-system)
(propagated-inputs
(list python-attrs
- ;; TOOD: Use the latest click version after release 0.13.1 or later
- ;; is made (see:
- ;; https://github.com/trezor/trezor-firmware/issues/2199).
- python-click-7
+ python-click
python-construct
python-ecdsa
python-hidapi
@@ -1100,14 +1097,21 @@ (define-public python-trezor
python-mnemonic
python-requests
python-typing-extensions))
- (native-inputs
- ;; For tests.
+ (native-inputs ; Only needed for running the tests
(list protobuf
python-black
python-isort
+ python-pillow
python-protobuf
python-pyqt
- python-pytest))
+ python-pytest
+ python-simple-rlp))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; This package only has a Python script, not a Python module, so the
+ ;; sanity-check phase can't work.
+ (delete 'sanity-check))))
(home-page "https://github.com/trezor/python-trezor")
(synopsis "Python library for communicating with TREZOR Hardware Wallet")
(description "@code{trezor} is a Python library for communicating with
--
2.35.1
A
A
Attila Lendvai wrote on 6 Dec 2022 19:46
[PATCH 2/3 v3] gnu: python-trezor-agent: Update to 0.14.5.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221206184607.8128-2-attila@lendvai.name
---
gnu/packages/finance.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 287ee38041..a81d82ad60 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -911,7 +911,7 @@ (define-public python-trezor-agent
;; the toplevel app called trezor-agent.
(package
(name "python-trezor-agent")
- (version "0.14.4")
+ (version "0.14.5")
(source
(origin
(method git-fetch)
@@ -920,7 +920,7 @@ (define-public python-trezor-agent
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1ksv494xpga27ifrjyn1bkqaya5h769lqb9rx1ng0n4kvmnrqr3l"))))
+ (base32 "1syg5an5hj8sr56hvcr45y8dymwy8va5h0pfyrmsnxcz8z5q1124"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -948,8 +948,12 @@ (define-public python-trezor-agent
python-semver
python-unidecode
python-wheel))
- (native-inputs
- (list gnupg python-mock python-pytest))
+ (native-inputs ; Only needed for running the tests
+ (list gnupg
+ python-bech32
+ python-cryptography
+ python-mock
+ python-pytest))
(home-page "https://github.com/romanz/trezor-agent")
(synopsis "Use hardware wallets as SSH and GPG agent")
(description
--
2.35.1
A
A
Attila Lendvai wrote on 6 Dec 2022 19:46
[PATCH 3/3 v3] gnu: trezor-agent: Fix build by adding native-inputs.
(address . 58437@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20221206184607.8128-3-attila@lendvai.name
The tests, and thus the build, were failing prior to this change.
---
gnu/packages/finance.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index a81d82ad60..ed4374c2fd 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1235,8 +1235,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
--
2.35.1
A
A
Attila Lendvai wrote on 26 Aug 2023 23:36
(No Subject)
(name . 58437@debbugs.gnu.org)(address . 58437@debbugs.gnu.org)
RGbuBkppXZFSV8bL8eG7T5vg5utY9ym1oeMrnF1MxxLLyP6OZ-ATkpSDn0HEvJmzqqTpbmacezDmOdNSwQFWSH7zlT-Ee4DmzH8R2OiJWQg=@lendvai.name
close 58437
done

meanwhile it's been superseded by https://issues.guix.gnu.org/65037that updates the packages to even newer versions.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Be the love you never received.”
— Rune Lazuli
A
A
Attila Lendvai wrote on 27 Aug 2023 00:00
(name . control@debbugs.gnu.org)(address . control@debbugs.gnu.org)
310Li_9OZySILzKiW2eqY3127t0BF_iVPa2uVIX8sHTwC_UUf8m8ksCNWIQefzw6ig47VWkrzavf3OqKVN_sbWJ-opUF1QZrZTrPLdCDxdA=@lendvai.name
close 58437
done
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58437@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58437
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch