evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / libagent / default.nix
blob3422ae2ced2d7c5fd95f0dfef013ace8d05913c7
2   lib,
3   fetchFromGitHub,
4   bech32,
5   buildPythonPackage,
6   setuptools,
7   cryptography,
8   ed25519,
9   ecdsa,
10   gnupg,
11   semver,
12   mnemonic,
13   unidecode,
14   mock,
15   pytestCheckHook,
16   backports-shutil-which,
17   configargparse,
18   python-daemon,
19   pymsgbox,
20   pynacl,
23 # When changing this package, please test packages {keepkey,ledger,onlykey,trezor}-agent
25 buildPythonPackage rec {
26   pname = "libagent";
27   version = "0.15.0";
28   pyproject = true;
30   src = fetchFromGitHub {
31     owner = "romanz";
32     repo = "trezor-agent";
33     rev = "refs/tags/v${version}";
34     hash = "sha256-NmpFyLjLdR9r1tc06iDNH8Tc7isUelTg13mWPrQvxSc=";
35   };
37   # hardcode the path to gpgconf in the libagent library
38   postPatch = ''
39     substituteInPlace libagent/gpg/keyring.py \
40       --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" \
41       --replace "'gpg-connect-agent'" "'${gnupg}/bin/gpg-connect-agent'"
42   '';
44   build-system = [ setuptools ];
46   dependencies = [
47     unidecode
48     backports-shutil-which
49     configargparse
50     python-daemon
51     pymsgbox
52     ecdsa
53     ed25519
54     mnemonic
55     semver
56     pynacl
57     bech32
58     cryptography
59   ];
61   pythonImportsCheck = [ "libagent" ];
63   nativeCheckInputs = [
64     mock
65     pytestCheckHook
66   ];
68   disabledTests = [
69     # test fails in sandbox
70     "test_get_agent_sock_path"
71   ];
73   meta = with lib; {
74     description = "Using hardware wallets as SSH/GPG agent";
75     homepage = "https://github.com/romanz/trezor-agent";
76     license = licenses.lgpl3Only;
77     maintainers = with maintainers; [ np ];
78   };