nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 79 lines 1.7 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchPypi 5, isPy3k 6, installShellFiles 7, attrs 8, click 9, construct 10, ecdsa 11, hidapi 12, libusb1 13, mnemonic 14, pillow 15, protobuf 16, pyblake2 17, requests 18, rlp 19, shamir-mnemonic 20, typing-extensions 21, trezor-udev-rules 22, pytestCheckHook 23}: 24 25buildPythonPackage rec { 26 pname = "trezor"; 27 version = "0.13.0"; 28 29 disabled = !isPy3k; 30 31 src = fetchPypi { 32 inherit pname version; 33 sha256 = "4571aa09dbfe88b31eb2f16c7c359b4809621b75a04b7b5bc9dbffe17046c99a"; 34 }; 35 36 nativeBuildInputs = [ installShellFiles ]; 37 38 propagatedBuildInputs = [ 39 attrs 40 click 41 construct 42 ecdsa 43 hidapi 44 libusb1 45 mnemonic 46 pillow 47 protobuf 48 pyblake2 49 requests 50 rlp 51 shamir-mnemonic 52 typing-extensions 53 ] ++ lib.optionals stdenv.isLinux [ 54 trezor-udev-rules 55 ]; 56 57 checkInputs = [ pytestCheckHook ]; 58 59 disabledTestPaths = [ 60 "tests/test_stellar.py" # requires stellar-sdk 61 ]; 62 63 postFixup = '' 64 mkdir completions 65 _TREZORCTL_COMPLETE=source_bash $out/bin/trezorctl > completions/trezorctl || true 66 _TREZORCTL_COMPLETE=source_zsh $out/bin/trezorctl > completions/_trezorctl || true 67 _TREZORCTL_COMPLETE=source_fish $out/bin/trezorctl > completions/trezorctl.fish || true 68 installShellCompletion --bash completions/trezorctl 69 installShellCompletion --zsh completions/_trezorctl 70 installShellCompletion --fish completions/trezorctl.fish 71 ''; 72 73 meta = with lib; { 74 description = "Python library for communicating with Trezor Hardware Wallet"; 75 homepage = "https://github.com/trezor/trezor-firmware/tree/master/python"; 76 license = licenses.gpl3; 77 maintainers = with maintainers; [ np prusnak mmahut _1000101 ]; 78 }; 79}