Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 aiohttp, 7 bcrypt, 8 pyopenssl, 9 python-gnupg, 10 requests, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "proton-core"; 16 version = "0.1.16"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "ProtonVPN"; 21 repo = "python-proton-core"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-072XuHvgWludlFwp/tqLpuAU89vzifFhwQ01FuiCoL8="; 24 }; 25 26 nativeBuildInputs = [ setuptools ]; 27 28 propagatedBuildInputs = [ 29 bcrypt 30 aiohttp 31 pyopenssl 32 python-gnupg 33 requests 34 ]; 35 36 postPatch = '' 37 substituteInPlace setup.cfg \ 38 --replace "--cov=proton --cov-report html --cov-report term" "" 39 ''; 40 41 pythonImportsCheck = [ "proton" ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 disabledTestPaths = [ 46 # Single test, requires internet connection 47 "tests/test_alternativerouting.py" 48 ]; 49 50 disabledTests = [ 51 # Invalid modulus 52 "test_modulus_verification" 53 # Permission denied: '/run' 54 "test_broken_data" 55 "test_broken_index" 56 "test_sessions" 57 # No working transports found 58 "test_auto_works_on_prod" 59 "test_ping" 60 "test_successful" 61 "test_without_pinning" 62 # Failed assertions 63 "test_bad_pinning_fingerprint_changed" 64 "test_bad_pinning_url_changed" 65 ]; 66 67 meta = { 68 description = "Core logic used by the other Proton components"; 69 homepage = "https://github.com/ProtonVPN/python-proton-core"; 70 license = lib.licenses.gpl3Only; 71 maintainers = [ ]; 72 }; 73}