25 buildPythonPackage rec {
28 format = "setuptools";
33 inherit pname version;
34 hash = "sha256-Y01O3fNWAyV8MhYY2FSMajWyc4Rle2XjsL261jWlfP8=";
37 nativeBuildInputs = [ installShellFiles ];
39 propagatedBuildInputs = [
54 ] ++ lib.optionals stdenv.isLinux [
58 nativeCheckInputs = [ pytestCheckHook ];
61 "tests/test_stellar.py" # requires stellar-sdk
62 "tests/test_firmware.py" # requires network downloads
65 pythonImportsCheck = [ "trezorlib" ];
68 $out/bin/trezorctl --version
73 _TREZORCTL_COMPLETE=source_bash $out/bin/trezorctl > completions/trezorctl || true
74 _TREZORCTL_COMPLETE=source_zsh $out/bin/trezorctl > completions/_trezorctl || true
75 _TREZORCTL_COMPLETE=source_fish $out/bin/trezorctl > completions/trezorctl.fish || true
76 installShellCompletion --bash completions/trezorctl
77 installShellCompletion --zsh completions/_trezorctl
78 installShellCompletion --fish completions/trezorctl.fish
82 description = "Python library for communicating with Trezor Hardware Wallet";
83 mainProgram = "trezorctl";
84 homepage = "https://github.com/trezor/trezor-firmware/tree/master/python";
85 license = licenses.gpl3;
86 maintainers = with maintainers; [ np prusnak mmahut ];