mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
pythonPackages.hwi: Fix dependencies, cleanup
This commit is contained in:
parent
8cc981adc2
commit
863d89b767
@ -1,46 +1,47 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, mnemonic
|
, bitbox02
|
||||||
, ecdsa
|
, ecdsa
|
||||||
, typing-extensions
|
|
||||||
, hidapi
|
, hidapi
|
||||||
, libusb1
|
, libusb1
|
||||||
|
, mnemonic
|
||||||
, pyaes
|
, pyaes
|
||||||
, trezor
|
, pythonAtLeast
|
||||||
, btchip
|
|
||||||
, ckcc-protocol
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "hwi";
|
pname = "hwi";
|
||||||
version = "1.2.1";
|
version = "1.2.1";
|
||||||
|
disabled = pythonAtLeast "3.9";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "bitcoin-core";
|
||||||
sha256 = "d0d220a4967d7f106b828b12a98b78c220d609d7cc6c811898e24fcf1a6f04f3";
|
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 = [
|
propagatedBuildInputs = [
|
||||||
mnemonic
|
bitbox02
|
||||||
ecdsa
|
ecdsa
|
||||||
typing-extensions
|
|
||||||
hidapi
|
hidapi
|
||||||
libusb1
|
libusb1
|
||||||
|
mnemonic
|
||||||
pyaes
|
pyaes
|
||||||
trezor
|
|
||||||
btchip
|
|
||||||
ckcc-protocol
|
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [ ./relax-deps.patch ];
|
# tests require to clone quite a few firmwares
|
||||||
|
|
||||||
# tests are not packaged in the released tarball
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [ "hwilib" ];
|
||||||
"hwilib"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Bitcoin Hardware Wallet Interface";
|
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