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