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