2021-03-22 06:38:32 -07:00
|
|
|
{ lib, pkgs, stdenv, fetchurl, fetchFromGitHub, python3 }:
|
2019-04-29 13:39:25 -07:00
|
|
|
|
|
|
|
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 {};
|
2020-07-19 06:52:46 -07:00
|
|
|
# HWI requires hidapi 0.7.99 but nixpkgs has a newer version
|
|
|
|
hidapi = self.callPackage ./hidapi {
|
|
|
|
inherit (pkgs) udev libusb1;
|
|
|
|
};
|
2020-04-26 11:51:28 -07:00
|
|
|
};
|
|
|
|
};
|
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";
|
2020-07-19 06:52:46 -07:00
|
|
|
version = "1.1.2";
|
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;
|
2020-07-19 06:52:46 -07:00
|
|
|
sha256 = "01xjkv74ksj8m0l6frk03wq82ilzp5gkz4rf7lhi1h6qkb9kb1x0";
|
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;
|
|
|
|
};
|
|
|
|
}
|