2019-11-17 06:20:35 -08:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, python3 }:
|
2019-04-29 13:39:25 -07:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
2020-04-26 11:51:28 -07:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
# HWI requires mnemonic <0.19 but nixpkgs has a newer version
|
|
|
|
mnemonic = self.callPackage ./mnemonic {};
|
|
|
|
# HWI requires ecdsa <0.14 but nixpkgs has a newer version
|
|
|
|
ecdsa = self.callPackage ./ecdsa {};
|
|
|
|
};
|
|
|
|
};
|
2019-04-29 13:39:25 -07:00
|
|
|
in
|
2020-04-26 11:51:28 -07:00
|
|
|
python.pkgs.buildPythonPackage rec {
|
2019-04-29 13:39:25 -07:00
|
|
|
pname = "hwi";
|
2019-11-17 06:20:35 -08:00
|
|
|
version = "1.0.3";
|
2019-04-29 13:39:25 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "HWI";
|
2019-06-25 11:02:46 -07:00
|
|
|
rev = version;
|
2019-11-17 06:20:35 -08:00
|
|
|
sha256 = "1xb8w6w6j6vv2ik2bb25y2w6m0gikmh5446jar0frfp6r6das5nn";
|
2019-04-29 13:39:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: enable tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-26 11:51:28 -07:00
|
|
|
propagatedBuildInputs = with python.pkgs; [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
2019-04-29 13:39:25 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/bitcoin-core/hwi;
|
|
|
|
};
|
|
|
|
}
|