Merge pull request #147065 from smancill/python3-ledgerwallet-upstream-patch

This commit is contained in:
Sandro 2021-11-30 19:48:42 +01:00 committed by GitHub
commit 646b059bd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 23 deletions

View file

@ -1,5 +1,6 @@
{ lib, stdenv { lib, stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, buildPythonPackage , buildPythonPackage
, cryptography , cryptography
, click , click
@ -26,10 +27,12 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(fetchpatch {
# Fix removed function in construct library # Fix removed function in construct library
# https://github.com/LedgerHQ/ledgerctl/issues/17 url = "https://github.com/LedgerHQ/ledgerctl/commit/fd23d0e14721b93789071e80632e6bd9e47c1256.patch";
# https://github.com/construct/construct/commit/8915512f53552b1493afdbce5bbf8bb6f2aa4411 sha256 = "sha256-YNlENguPQW5FNFT7mqED+ghF3TJiKao4H+56Eu+j+Eo=";
./remove-iterateints.patch excludes = [ "setup.py" ];
})
]; ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];

View file

@ -1,19 +0,0 @@
--- 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