Skip to content

Commit

Permalink
Merge pull request NixOS#168836 from prusnak/hwi
Browse files Browse the repository at this point in the history
hwi: 2.0.2 -> 2.1.0
  • Loading branch information
Artturin authored Apr 16, 2022
2 parents bc92e5f + a491ff3 commit 34baf79
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pkgs/development/python-modules/hwi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,48 @@
, buildPythonPackage
, fetchFromGitHub
, bitbox02
, cbor
, ecdsa
, hidapi
, libusb1
, mnemonic
, pyaes
, pyserial
, typing-extensions
, pythonOlder
}:

buildPythonPackage rec {
pname = "hwi";
version = "2.0.2";
version = "2.1.0";
format = "setuptools";

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "HWI";
rev = version;
sha256 = "sha256-s0pKYqesZjHE6YndqsMwCuqLK7eE82oRiSXxBdUtEX4=";
sha256 = "sha256-ih4k58OdH5taf/7fvqLeWLrMzR38uPpDSGE4KU8sEAk=";
};

propagatedBuildInputs = [
bitbox02
cbor
ecdsa
hidapi
libusb1
mnemonic
pyaes
pyserial
typing-extensions
];

# make compatible with libusb1 2.x
# relax required dependencies:
# libusb1 - https://github.com/bitcoin-core/HWI/issues/579
# typing-extensions - https://github.com/bitcoin-core/HWI/issues/572
postPatch = ''
substituteInPlace setup.py \
--replace 'libusb1>=1.7,<2.0' 'libusb1>=1.7' \
--replace "'python_requires': '>=3.6,<3.10'," "'python_requires': '>=3.6,<4'," \
--replace 'typing-extensions>=3.7,<4.0' 'typing-extensions>=3.7'
--replace 'libusb1>=1.7,<3' 'libusb1>=1.7,<4' \
--replace 'typing-extensions>=3.7,<4.0' 'typing-extensions>=3.7,<5.0'
'';

# tests require to clone quite a few firmwares
Expand Down

0 comments on commit 34baf79

Please sign in to comment.