depot/third_party/nixpkgs/pkgs/development/python-modules/proton-vpn-session/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

65 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cryptography,
distro,
proton-core,
proton-vpn-logger,
pynacl,
aiohttp,
pyopenssl,
pytest-asyncio,
requests,
pytestCheckHook,
pytest-cov-stub,
}:
buildPythonPackage rec {
pname = "proton-vpn-session";
version = "0.6.7";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-session";
rev = "refs/tags/v${version}";
hash = "sha256-/5ju/2bxhqK6JWchkxFe3amBKHtO98GCVQWIrUsn+nQ=";
};
build-system = [
setuptools
];
dependencies = [
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
pytest-cov-stub
];
meta = {
description = "Provides utility classes to manage VPN sessions";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-session";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ sebtm ];
};
}