at 25.11-pre 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchPypi, 6 click, 7 construct, 8 construct-classes, 9 cryptography, 10 ecdsa, 11 libusb1, 12 mnemonic, 13 requests, 14 setuptools, 15 shamir-mnemonic, 16 slip10, 17 typing-extensions, 18 trezor-udev-rules, 19 pytestCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "trezor"; 24 version = "0.13.10"; 25 pyproject = true; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-egtq5GKN0MMaXOtRJYkY2bvdOthROIg3IlgmsijuUE8="; 30 }; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 click 36 construct 37 construct-classes 38 cryptography 39 ecdsa 40 libusb1 41 mnemonic 42 requests 43 shamir-mnemonic 44 slip10 45 typing-extensions 46 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 disabledTestPaths = [ 51 "tests/test_stellar.py" # requires stellar-sdk 52 "tests/test_firmware.py" # requires network downloads 53 ]; 54 55 pythonImportsCheck = [ "trezorlib" ]; 56 57 postCheck = '' 58 $out/bin/trezorctl --version 59 ''; 60 61 meta = with lib; { 62 description = "Python library for communicating with Trezor Hardware Wallet"; 63 mainProgram = "trezorctl"; 64 homepage = "https://github.com/trezor/trezor-firmware/tree/master/python"; 65 changelog = "https://github.com/trezor/trezor-firmware/blob/python/v${version}/python/CHANGELOG.md"; 66 license = licenses.lgpl3Only; 67 maintainers = with maintainers; [ 68 np 69 prusnak 70 mmahut 71 ]; 72 }; 73}