2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools
|
|
|
|
, proton-core
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "proton-vpn-logger";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.2.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "python-proton-vpn-logger";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-/LfMjyTs/EusgnKEQugsdJzqDZBvaAhbsTUVLDCRw0I=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
proton-core
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "--cov=proton/vpn/logging/ --cov-report html --cov-report term" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "proton.vpn.logging" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Needed for Permission denied: '/homeless-shelter'
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "General purpose logging package for the entire ProtonVPN Linux client";
|
|
|
|
homepage = "https://github.com/ProtonVPN/python-proton-vpn-logger";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
};
|
|
|
|
}
|