2020-07-19 13:52:46 +00:00
|
|
|
{ pkgs, stdenv, fetchurl, fetchFromGitHub, python3 }:
|
2019-04-29 20:39:25 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
2020-04-26 18:51:28 +00: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 {};
|
2020-07-19 13:52:46 +00:00
|
|
|
# HWI requires hidapi 0.7.99 but nixpkgs has a newer version
|
|
|
|
hidapi = self.callPackage ./hidapi {
|
|
|
|
inherit (pkgs) udev libusb1;
|
|
|
|
};
|
2020-04-26 18:51:28 +00:00
|
|
|
};
|
|
|
|
};
|
2019-04-29 20:39:25 +00:00
|
|
|
in
|
2020-04-26 18:51:28 +00:00
|
|
|
python.pkgs.buildPythonPackage rec {
|
2019-04-29 20:39:25 +00:00
|
|
|
pname = "hwi";
|
2020-07-19 13:52:46 +00:00
|
|
|
version = "1.1.2";
|
2019-04-29 20:39:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "HWI";
|
2019-06-25 18:02:46 +00:00
|
|
|
rev = version;
|
2020-07-19 13:52:46 +00:00
|
|
|
sha256 = "01xjkv74ksj8m0l6frk03wq82ilzp5gkz4rf7lhi1h6qkb9kb1x0";
|
2019-04-29 20:39:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: enable tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-26 18:51:28 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
2019-04-29 20:39:25 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/bitcoin-core/hwi;
|
|
|
|
};
|
|
|
|
}
|