1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 keyring,
7 proton-core,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "proton-keyring-linux";
13 version = "0.0.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "ProtonVPN";
18 repo = "python-proton-keyring-linux";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-c2wdbd8Hkz2hF9zYMy4/V/W6uZRItz7tWqLJqTsJoHU=";
21 };
22
23 nativeBuildInputs = [ setuptools ];
24
25 propagatedBuildInputs = [
26 keyring
27 proton-core
28 ];
29
30 postPatch = ''
31 substituteInPlace setup.cfg \
32 --replace "--cov=proton.keyring_linux.core --cov-report html --cov-report term" ""
33 '';
34
35 pythonImportsCheck = [ "proton.keyring_linux.core" ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 meta = with lib; {
40 description = "ProtonVPN core component to access Linux's keyring";
41 homepage = "https://github.com/ProtonVPN/python-proton-keyring-linux";
42 license = licenses.gpl3Only;
43 maintainers = with maintainers; [ wolfangaukang ];
44 };
45}