nixpkgs/pkgs/development/python-modules/snitun/default.nix

62 lines
1.5 KiB
Nix

{ lib
, stdenv
, async-timeout
, attrs
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pytest-aiohttp
, pytestCheckHook
, pythonAtLeast
, pythonOlder
}:
buildPythonPackage rec {
pname = "snitun";
version = "0.35.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "NabuCasa";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-sZMmou9uHThl7AIMnuBxABnWTF1CCFsDj1I7FYxgJ3Y=";
};
propagatedBuildInputs = [
async-timeout
attrs
cryptography
];
nativeCheckInputs = [
pytest-aiohttp
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
"test_multiplexer_data_channel_abort_full" # https://github.com/NabuCasa/snitun/issues/61
# port binding conflicts
"test_snitun_single_runner_timeout"
"test_snitun_single_runner_throttling"
# ConnectionResetError: [Errno 54] Connection reset by peer
"test_peer_listener_timeout"
] ++ lib.optionals (pythonAtLeast "3.11") [
# TypeError: Passing coroutines is forbidden, use tasks explicitly.
"test_snitun_runner_updown"
];
pythonImportsCheck = [ "snitun" ];
meta = with lib; {
changelog = "https://github.com/NabuCasa/snitun/releases/tag/${version}";
homepage = "https://github.com/nabucasa/snitun";
description = "SNI proxy with TCP multiplexer";
license = licenses.gpl3Only;
maintainers = with maintainers; [ Scriptkiddi ];
platforms = platforms.linux;
};
}