1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, buildPythonPackage 6, cryptography 7, click 8, construct 9, ecdsa 10, flit-core 11, hidapi 12, intelhex 13, pillow 14, protobuf3 15, requests 16, setuptools 17, tabulate 18, toml 19, AppKit 20}: 21 22buildPythonPackage rec { 23 pname = "ledgerwallet"; 24 version = "0.2.4"; 25 format = "pyproject"; 26 27 src = fetchFromGitHub { 28 owner = "LedgerHQ"; 29 repo = "ledgerctl"; 30 rev = "v${version}"; 31 hash = "sha256-IcStYYkKEdZxwgJKL8l2Y1BtO/Oncd4aKUAZD8umbHs="; 32 }; 33 34 buildInputs = [ flit-core setuptools ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; 35 propagatedBuildInputs = [ 36 cryptography 37 click 38 construct 39 ecdsa 40 hidapi 41 intelhex 42 pillow 43 protobuf3 44 requests 45 tabulate 46 toml 47 ]; 48 49 pythonImportsCheck = [ "ledgerwallet" ]; 50 51 meta = with lib; { 52 homepage = "https://github.com/LedgerHQ/ledgerctl"; 53 description = "A library to control Ledger devices"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ d-xo erdnaxe ]; 56 }; 57}