depot/third_party/nixpkgs/pkgs/development/python-modules/proton-vpn-logger/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

46 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
proton-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "proton-vpn-logger";
version = "0.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-logger";
rev = "refs/tags/v${version}";
hash = "sha256-/LfMjyTs/EusgnKEQugsdJzqDZBvaAhbsTUVLDCRw0I=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ proton-core ];
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "--cov=proton/vpn/logging/ --cov-report html --cov-report term" ""
'';
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 = [ ];
};
}