about summary refs log tree commit diff
path: root/pkgs/development/python-modules/proton-keyring-linux/default.nix
blob: 4dac98134ac0a6b7c30575e3676031d05909ceca (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, keyring
, proton-core
, pytestCheckHook
}:

buildPythonPackage {
  pname = "proton-keyring-linux";
  version = "0.0.1-unstable-2023-04-14";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ProtonVPN";
    repo = "python-proton-keyring-linux";
    rev = "5ff3c7f9a1a162836649502dd23c2fbe1f487d73";
    hash = "sha256-4d8ZePG8imURhdNtLbraMRisrTLoRvJ+L2UuuOo3MPM=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    keyring
    proton-core
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "--cov=proton.keyring_linux.core --cov-report html --cov-report term" ""
  '';

  pythonImportsCheck = [ "proton.keyring_linux.core" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "ProtonVPN core component to access Linux's keyring";
    homepage = "https://github.com/ProtonVPN/python-proton-keyring-linux";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ wolfangaukang ];
  };
}