about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/keyrings-cryptfile/default.nix
blob: 1621bcb30d9516f43028bc378dc8fac9e25c7888 (plain) (blame)
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
{ lib
, argon2-cffi
, buildPythonPackage
, fetchPypi
, keyring
, pycryptodome
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "keyrings-cryptfile";
  version = "1.3.9";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchPypi {
    pname = "keyrings.cryptfile";
    inherit version;
    hash = "sha256-fCpFPKuZhUJrjCH3rVSlfkn/joGboY4INAvYgBrPAJE=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "-s --cov=keyrings/cryptfile" ""
  '';

  propagatedBuildInputs = [
    argon2-cffi
    keyring
    pycryptodome
  ];

  pythonImportsCheck = [
    "keyrings.cryptfile"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # FileNotFoundError: [Errno 2] No such file or directory: '/build/...
    "test_versions"
  ];

  meta = with lib; {
    description = "Encrypted file keyring backend";
    mainProgram = "cryptfile-convert";
    homepage = "https://github.com/frispete/keyrings.cryptfile";
    changelog = "https://github.com/frispete/keyrings.cryptfile/blob/v${version}/CHANGES.md";
    license = licenses.mit;
    maintainers = [ maintainers.bbjubjub ];
  };
}