diff --git a/pkgs/development/python-modules/keepkey/default.nix b/pkgs/development/python-modules/keepkey/default.nix index 8eba12dfcea..9ea6840c4d2 100644 --- a/pkgs/development/python-modules/keepkey/default.nix +++ b/pkgs/development/python-modules/keepkey/default.nix @@ -1,21 +1,25 @@ -{ stdenv, fetchPypi, buildPythonPackage, ecdsa -, mnemonic, protobuf, hidapi }: +{ stdenv, fetchFromGitHub, buildPythonPackage, pytest +, ecdsa , mnemonic, protobuf, hidapi, trezor }: buildPythonPackage rec { name = "${pname}-${version}"; pname = "keepkey"; version = "4.0.0"; - src = fetchPypi { - inherit pname version; - sha256 = "95c8d5127919f9fc4bb0120b05f92efc8f526d4a68122ac18e63509571ac45a2"; + src = fetchFromGitHub { + owner = "keepkey"; + repo = "python-keepkey"; + rev = "v${version}"; + sha256 = "144awjkc169z2n1ffirs697y6m97izh3pbh3sjhy3nji7jszh592"; }; - propagatedBuildInputs = [ protobuf hidapi ]; + propagatedBuildInputs = [ protobuf hidapi trezor ]; buildInputs = [ ecdsa mnemonic ]; - # There are no actual tests: "ImportError: No module named tests" + checkInputs = [ pytest ]; + + # tests requires hardware doCheck = false; # Remove impossible dependency constraint diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix index cca10794258..e8cecda7589 100644 --- a/pkgs/development/python-modules/libagent/default.nix +++ b/pkgs/development/python-modules/libagent/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa -, semver, keepkey, trezor, mnemonic, ledgerblue +, semver, keepkey, trezor, mnemonic, ledgerblue, unidecode, mock, pytest }: buildPythonPackage rec { @@ -17,6 +17,14 @@ buildPythonPackage rec { trezor mnemonic ledgerblue ]; + propagatedBuildInputs = [ unidecode ]; + + checkInputs = [ mock pytest ]; + + checkPhase = '' + py.test libagent/tests + ''; + meta = with stdenv.lib; { description = "Using hardware wallets as SSH/GPG agent"; homepage = https://github.com/romanz/trezor-agent; diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix index c473403f53d..cb4b63ade81 100644 --- a/pkgs/development/python-modules/trezor/default.nix +++ b/pkgs/development/python-modules/trezor/default.nix @@ -12,9 +12,9 @@ buildPythonPackage rec { sha256 = "6bdb69fc125ba705854e21163be6c7da3aa17c2a3a84f40b6d8a3f6e4a8cb314"; }; - propagatedBuildInputs = [ protobuf hidapi requests ]; + propagatedBuildInputs = [ protobuf hidapi requests mnemonic ]; - buildInputs = [ ecdsa mnemonic ]; + buildInputs = [ ecdsa ]; # There are no actual tests: "ImportError: No module named tests" doCheck = false;