1{ lib
2, argon2-cffi
3, buildPythonPackage
4, fetchPypi
5, keyring
6, pycryptodome
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "keyrings-cryptfile";
13 version = "1.3.9";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.5";
17
18 src = fetchPypi {
19 pname = "keyrings.cryptfile";
20 inherit version;
21 hash = "sha256-fCpFPKuZhUJrjCH3rVSlfkn/joGboY4INAvYgBrPAJE=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.cfg \
26 --replace "-s --cov=keyrings/cryptfile" ""
27 '';
28
29 propagatedBuildInputs = [
30 argon2-cffi
31 keyring
32 pycryptodome
33 ];
34
35 pythonImportsCheck = [
36 "keyrings.cryptfile"
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # FileNotFoundError: [Errno 2] No such file or directory: '/build/...
45 "test_versions"
46 ];
47
48 meta = with lib; {
49 description = "Encrypted file keyring backend";
50 homepage = "https://github.com/frispete/keyrings.cryptfile";
51 changelog = "https://github.com/frispete/keyrings.cryptfile/blob/v${version}/CHANGES.md";
52 license = licenses.mit;
53 maintainers = teams.chia.members;
54 };
55}