at 23.11-beta 1.6 kB view raw
1{ lib 2, stdenv 3, async-timeout 4, attrs 5, buildPythonPackage 6, cryptography 7, fetchFromGitHub 8, pytest-aiohttp 9, pytestCheckHook 10, pythonAtLeast 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "snitun"; 16 version = "0.36.2"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "NabuCasa"; 23 repo = pname; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-ViNsmTq1iLxNujA71b9JZB5AZ79ZbiqdTyDeBGd4gUA="; 26 }; 27 28 propagatedBuildInputs = [ 29 async-timeout 30 attrs 31 cryptography 32 ]; 33 34 nativeCheckInputs = [ 35 pytest-aiohttp 36 pytestCheckHook 37 ]; 38 39 disabledTests = [ 40 # broke after aiohttp 3.8.5 upgrade 41 "test_client_stop_no_wait" 42 ] ++ lib.optionals stdenv.isDarwin [ 43 "test_multiplexer_data_channel_abort_full" # https://github.com/NabuCasa/snitun/issues/61 44 # port binding conflicts 45 "test_snitun_single_runner_timeout" 46 "test_snitun_single_runner_throttling" 47 # ConnectionResetError: [Errno 54] Connection reset by peer 48 "test_peer_listener_timeout" 49 ] ++ lib.optionals (pythonAtLeast "3.11") [ 50 # TypeError: Passing coroutines is forbidden, use tasks explicitly. 51 "test_snitun_runner_updown" 52 ]; 53 54 pythonImportsCheck = [ "snitun" ]; 55 56 meta = with lib; { 57 changelog = "https://github.com/NabuCasa/snitun/releases/tag/${version}"; 58 homepage = "https://github.com/nabucasa/snitun"; 59 description = "SNI proxy with TCP multiplexer"; 60 license = licenses.gpl3Only; 61 maintainers = with maintainers; [ Scriptkiddi ]; 62 platforms = platforms.linux; 63 }; 64}