at 24.11-pre 66 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cryptography, 7 distro, 8 proton-core, 9 proton-vpn-logger, 10 pynacl, 11 aiohttp, 12 pyopenssl, 13 pytest-asyncio, 14 requests, 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "proton-vpn-session"; 20 version = "0.6.7"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "ProtonVPN"; 25 repo = "python-proton-vpn-session"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-/5ju/2bxhqK6JWchkxFe3amBKHtO98GCVQWIrUsn+nQ="; 28 }; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 propagatedBuildInputs = [ 33 cryptography 34 distro 35 proton-core 36 proton-vpn-logger 37 pynacl 38 ]; 39 40 postPatch = '' 41 substituteInPlace setup.cfg \ 42 --replace-fail "--cov=proton.vpn.session --cov-report term" "" 43 ''; 44 45 pythonImportsCheck = [ "proton.vpn.session" ]; 46 47 postInstall = '' 48 # Needed for Permission denied: '/homeless-shelter' 49 export HOME=$(mktemp -d) 50 ''; 51 52 nativeCheckInputs = [ 53 aiohttp 54 pyopenssl 55 pytest-asyncio 56 requests 57 pytestCheckHook 58 ]; 59 60 meta = { 61 description = "Provides utility classes to manage VPN sessions"; 62 homepage = "https://github.com/ProtonVPN/python-proton-vpn-session"; 63 license = lib.licenses.gpl3Only; 64 maintainers = with lib.maintainers; [ wolfangaukang ]; 65 }; 66}