diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2020-07-15 16:37:51 +0200 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-08-03 14:13:18 -0700 |
commit | 64a8d0115bbf43b5fd618d366040bafb83504cbd (patch) | |
tree | a5a838130d905c695b3eb12446be9edd5502f39d /pkgs/development/python-modules | |
parent | fd2c4f05f2335d27c7efe2247678ae0437cf887c (diff) |
python3Packages.hwi: init at 1.1.2
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/hwi/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/python-modules/hwi/relax-deps.patch | 16 |
2 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/hwi/default.nix b/pkgs/development/python-modules/hwi/default.nix new file mode 100644 index 0000000000000..de9c7995bde97 --- /dev/null +++ b/pkgs/development/python-modules/hwi/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, mnemonic +, ecdsa +, typing-extensions +, hidapi +, libusb1 +, pyaes +, trezor +, btchip +, ckcc-protocol +}: + +buildPythonPackage rec { + pname = "hwi"; + version = "1.1.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "eec460a51eb556500c1eca92015be246d5714cd53171407a76da71e4346048ae"; + }; + + propagatedBuildInputs = [ + mnemonic + ecdsa + typing-extensions + hidapi + libusb1 + pyaes + trezor + btchip + ckcc-protocol + ]; + + patches = [ ./relax-deps.patch ]; + + # tests are not packaged in the released tarball + doCheck = false; + + pythonImportsCheck = [ + "hwilib" + ]; + + meta = { + description = "Bitcoin Hardware Wallet Interface"; + homepage = "https://github.com/bitcoin-core/hwi"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ prusnak ]; + }; +} diff --git a/pkgs/development/python-modules/hwi/relax-deps.patch b/pkgs/development/python-modules/hwi/relax-deps.patch new file mode 100644 index 0000000000000..ff6c6b9768f62 --- /dev/null +++ b/pkgs/development/python-modules/hwi/relax-deps.patch @@ -0,0 +1,16 @@ +--- 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'] + |