mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
pythonPackages.hwi: Fix dependencies, cleanup
This commit is contained in:
parent
8cc981adc2
commit
863d89b767
@ -1,46 +1,47 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, mnemonic
|
||||
, fetchFromGitHub
|
||||
, bitbox02
|
||||
, ecdsa
|
||||
, typing-extensions
|
||||
, hidapi
|
||||
, libusb1
|
||||
, mnemonic
|
||||
, pyaes
|
||||
, trezor
|
||||
, btchip
|
||||
, ckcc-protocol
|
||||
, pythonAtLeast
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hwi";
|
||||
version = "1.2.1";
|
||||
disabled = pythonAtLeast "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "d0d220a4967d7f106b828b12a98b78c220d609d7cc6c811898e24fcf1a6f04f3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitcoin-core";
|
||||
repo = "HWI";
|
||||
rev = version;
|
||||
sha256 = "0fs3152lw7y5l9ssr5as8gd739m9lb7wxpv1vc5m77k5nw7l8ax5";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "'ecdsa>=0.13.0,<0.14.0'" "'ecdsa'" \
|
||||
--replace "'hidapi>=0.7.99,<0.8.0'" "'hidapi'" \
|
||||
--replace "'mnemonic>=0.18.0,<0.19.0'" "'mnemonic'"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
mnemonic
|
||||
bitbox02
|
||||
ecdsa
|
||||
typing-extensions
|
||||
hidapi
|
||||
libusb1
|
||||
mnemonic
|
||||
pyaes
|
||||
trezor
|
||||
btchip
|
||||
ckcc-protocol
|
||||
];
|
||||
|
||||
patches = [ ./relax-deps.patch ];
|
||||
|
||||
# tests are not packaged in the released tarball
|
||||
# tests require to clone quite a few firmwares
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"hwilib"
|
||||
];
|
||||
pythonImportsCheck = [ "hwilib" ];
|
||||
|
||||
meta = {
|
||||
description = "Bitcoin Hardware Wallet Interface";
|
||||
|
@ -1,16 +0,0 @@
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -98,10 +98,10 @@ package_data = \
|
||||
modules = \
|
||||
['hwi', 'hwi-qt']
|
||||
install_requires = \
|
||||
-['ecdsa>=0.13.0,<0.14.0',
|
||||
- 'hidapi>=0.7.99,<0.8.0',
|
||||
+['ecdsa',
|
||||
+ 'hidapi',
|
||||
'libusb1>=1.7,<2.0',
|
||||
+ 'mnemonic',
|
||||
- 'mnemonic>=0.18.0,<0.19.0',
|
||||
'pyaes>=1.6,<2.0',
|
||||
'typing-extensions>=3.7,<4.0']
|
||||
|
Loading…
Reference in New Issue
Block a user