git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.ledgerwallet: use upstream patch

Follow up to 5d56c78f373 (python3Packages.ledgerwallet: fix build, 2021-11-17), now with upstream patch.

commit0824be950d5991c9e46f7f1f4d155dd56114c085 authorSebastián Mancilla <smancill@smancill.dev> dateMon 22 Nov 2021, 20:30 (5 years ago) parentfbd3124
2 files changed+7−23
pkgs/development/python-modules/ledgerwallet/default.nix+7−4 pkgs/development/python-modules/ledgerwallet/remove-iterateints.patch−19
pkgs/development/python-modules/ledgerwallet/default.nix+7−4
@@ -1,5 +1,6 @@
11{ lib, stdenv
22, fetchFromGitHub
3+, fetchpatch
34, buildPythonPackage
45, cryptography
56, click
@@ -26,10 +27,12 @@ buildPythonPackage rec {
2627 };
2728
2829 patches = [
29− # Fix removed function in construct library
30− # https://github.com/LedgerHQ/ledgerctl/issues/17
31− # https://github.com/construct/construct/commit/8915512f53552b1493afdbce5bbf8bb6f2aa4411
32− ./remove-iterateints.patch
30+ (fetchpatch {
31+ # Fix removed function in construct library
32+ url = "https://github.com/LedgerHQ/ledgerctl/commit/fd23d0e14721b93789071e80632e6bd9e47c1256.patch";
33+ sha256 = "sha256-YNlENguPQW5FNFT7mqED+ghF3TJiKao4H+56Eu+j+Eo=";
34+ excludes = [ "setup.py" ];
35+ })
3336 ];
3437
3538 buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
pkgs/development/python-modules/ledgerwallet/remove-iterateints.patchdeleted−19
@@ -1,19 +0,0 @@
1−--- a/ledgerwallet/params.py 2021-11-17 20:31:10.488954050 -0300
2−+++ b/ledgerwallet/params.py 2021-11-17 20:31:30.619477930 -0300
3−@@ -19,7 +19,6 @@
4− )
5− from construct.core import (
6− byte2int,
7−- iterateints,
8− singleton,
9− stream_read,
10− stream_write,
11−@@ -40,7 +39,7 @@
12− num_bytes = byte & 0x80
13− encoded_len = stream_read(stream, num_bytes)
14− num = 0
15−- for len_byte in iterateints(encoded_len):
16−+ for len_byte in encoded_len:
17− num = num << 8 + len_byte
18− return num
19−