diff options
Diffstat (limited to 'pkgs/development/python-modules/trezor/default.nix')
-rw-r--r-- | pkgs/development/python-modules/trezor/default.nix | 79 |
1 files changed, 29 insertions, 50 deletions
diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix index 7a4403550964..62c94ce4bd7c 100644 --- a/pkgs/development/python-modules/trezor/default.nix +++ b/pkgs/development/python-modules/trezor/default.nix @@ -1,59 +1,43 @@ -{ stdenv -, lib -, buildPythonPackage -, fetchPypi -, isPy3k -, installShellFiles -, attrs -, click -, construct -, construct-classes -, ecdsa -, hidapi -, libusb1 -, mnemonic -, pillow -, protobuf -, requests -, shamir-mnemonic -, simple-rlp -, typing-extensions -, trezor-udev-rules -, pytestCheckHook +{ + stdenv, + lib, + buildPythonPackage, + fetchPypi, + click, + construct, + construct-classes, + ecdsa, + libusb1, + mnemonic, + requests, + setuptools, + typing-extensions, + trezor-udev-rules, + pytestCheckHook, }: buildPythonPackage rec { pname = "trezor"; - version = "0.13.8"; - format = "setuptools"; - - disabled = !isPy3k; + version = "0.13.9"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-Y01O3fNWAyV8MhYY2FSMajWyc4Rle2XjsL261jWlfP8="; + hash = "sha256-lFC9e7nSPl4zo8nljhjwWLRMnZw0ymZLSYGnlaqfse8="; }; - nativeBuildInputs = [ installShellFiles ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ - attrs + dependencies = [ click construct construct-classes ecdsa - hidapi libusb1 mnemonic - pillow - protobuf requests - shamir-mnemonic - simple-rlp typing-extensions - ] ++ lib.optionals stdenv.isLinux [ - trezor-udev-rules - ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -68,21 +52,16 @@ buildPythonPackage rec { $out/bin/trezorctl --version ''; - postFixup = '' - mkdir completions - _TREZORCTL_COMPLETE=source_bash $out/bin/trezorctl > completions/trezorctl || true - _TREZORCTL_COMPLETE=source_zsh $out/bin/trezorctl > completions/_trezorctl || true - _TREZORCTL_COMPLETE=source_fish $out/bin/trezorctl > completions/trezorctl.fish || true - installShellCompletion --bash completions/trezorctl - installShellCompletion --zsh completions/_trezorctl - installShellCompletion --fish completions/trezorctl.fish - ''; - meta = with lib; { description = "Python library for communicating with Trezor Hardware Wallet"; mainProgram = "trezorctl"; homepage = "https://github.com/trezor/trezor-firmware/tree/master/python"; - license = licenses.gpl3; - maintainers = with maintainers; [ np prusnak mmahut ]; + changelog = "https://github.com/trezor/trezor-firmware/blob/python/v${version}/python/CHANGELOG.md"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ + np + prusnak + mmahut + ]; }; } |