Merge pull request #146447 from smancill/zhf-ledgerwallet

python3Packages.ledgerwallet: fix build
This commit is contained in:
Fabian Affolter 2021-11-18 09:01:12 +01:00 committed by GitHub
commit 8d0389b025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View File

@ -25,6 +25,13 @@ buildPythonPackage rec {
sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk";
};
patches = [
# Fix removed function in construct library
# https://github.com/LedgerHQ/ledgerctl/issues/17
# https://github.com/construct/construct/commit/8915512f53552b1493afdbce5bbf8bb6f2aa4411
./remove-iterateints.patch
];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
propagatedBuildInputs = [
cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate

View File

@ -0,0 +1,19 @@
--- a/ledgerwallet/params.py 2021-11-17 20:31:10.488954050 -0300
+++ b/ledgerwallet/params.py 2021-11-17 20:31:30.619477930 -0300
@@ -19,7 +19,6 @@
)
from construct.core import (
byte2int,
- iterateints,
singleton,
stream_read,
stream_write,
@@ -40,7 +39,7 @@
num_bytes = byte & 0x80
encoded_len = stream_read(stream, num_bytes)
num = 0
- for len_byte in iterateints(encoded_len):
+ for len_byte in encoded_len:
num = num << 8 + len_byte
return num