Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 77 lines 1.6 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 ] 47 ++ lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ]; 48 49 # fix "click<8.2,>=7 not satisfied by version 8.3.1" 50 pythonRelaxDeps = [ "click" ]; 51 52 nativeCheckInputs = [ pytestCheckHook ]; 53 54 disabledTestPaths = [ 55 "tests/test_stellar.py" # requires stellar-sdk 56 "tests/test_firmware.py" # requires network downloads 57 ]; 58 59 pythonImportsCheck = [ "trezorlib" ]; 60 61 postCheck = '' 62 $out/bin/trezorctl --version 63 ''; 64 65 meta = { 66 description = "Python library for communicating with Trezor Hardware Wallet"; 67 mainProgram = "trezorctl"; 68 homepage = "https://github.com/trezor/trezor-firmware/tree/master/python"; 69 changelog = "https://github.com/trezor/trezor-firmware/blob/python/v${version}/python/CHANGELOG.md"; 70 license = lib.licenses.lgpl3Only; 71 maintainers = with lib.maintainers; [ 72 np 73 prusnak 74 mmahut 75 ]; 76 }; 77}