2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
cryptography,
|
|
|
|
distro,
|
|
|
|
proton-core,
|
|
|
|
proton-vpn-logger,
|
|
|
|
pynacl,
|
|
|
|
aiohttp,
|
|
|
|
pyopenssl,
|
|
|
|
pytest-asyncio,
|
|
|
|
requests,
|
|
|
|
pytestCheckHook,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "proton-vpn-session";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.6.7";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "python-proton-vpn-session";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-/5ju/2bxhqK6JWchkxFe3amBKHtO98GCVQWIrUsn+nQ=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
cryptography
|
|
|
|
distro
|
|
|
|
proton-core
|
|
|
|
proton-vpn-logger
|
|
|
|
pynacl
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "proton.vpn.session" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Needed for Permission denied: '/homeless-shelter'
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aiohttp
|
|
|
|
pyopenssl
|
|
|
|
pytest-asyncio
|
|
|
|
requests
|
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Provides utility classes to manage VPN sessions";
|
|
|
|
homepage = "https://github.com/ProtonVPN/python-proton-vpn-session";
|
|
|
|
license = lib.licenses.gpl3Only;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with lib.maintainers; [ sebtm ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|