2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
proton-core,
|
|
|
|
pytestCheckHook,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "proton-vpn-killswitch";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.4.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "python-proton-vpn-killswitch";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-XZqjAhxgIiATJd3JcW2WWUMC1b6+cfZRhXlIPyMUFH8=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ proton-core ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=proton --cov-report=html --cov-report=term" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "proton.vpn.killswitch.interface" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Defines the ProtonVPN kill switch interface";
|
|
|
|
homepage = "https://github.com/ProtonVPN/python-proton-vpn-killswitch";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
};
|
|
|
|
}
|