diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:06:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:21:18 +0000 |
commit | 7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch) | |
tree | b68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/python-modules/hwi | |
parent | c5c7451dbef37b51f52792d6395a670ef5183d27 (diff) | |
parent | 891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff) | |
download | nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2 nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip |
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/hwi')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/hwi/default.nix | 41 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/hwi/relax-deps.patch | 16 |
2 files changed, 21 insertions, 36 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/hwi/default.nix b/nixpkgs/pkgs/development/python-modules/hwi/default.nix index 6431791d65e6..7c34235a190b 100644 --- a/nixpkgs/pkgs/development/python-modules/hwi/default.nix +++ b/nixpkgs/pkgs/development/python-modules/hwi/default.nix @@ -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"; diff --git a/nixpkgs/pkgs/development/python-modules/hwi/relax-deps.patch b/nixpkgs/pkgs/development/python-modules/hwi/relax-deps.patch deleted file mode 100644 index ff6c6b9768f6..000000000000 --- a/nixpkgs/pkgs/development/python-modules/hwi/relax-deps.patch +++ /dev/null @@ -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'] - |