2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, async-timeout
|
|
|
|
, attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snitun";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.33.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NabuCasa";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-6aLvNw5/I5UvTRFzUK93YruKarM8S+gHIYd4hyTp/Qs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
attrs
|
|
|
|
cryptography
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
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"
|
2021-04-12 18:23:04 +00:00
|
|
|
# ConnectionResetError: [Errno 54] Connection reset by peer
|
|
|
|
"test_peer_listener_timeout"
|
2020-05-03 17:38:23 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pythonImportsCheck = [ "snitun" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/NabuCasa/snitun/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nabucasa/snitun";
|
|
|
|
description = "SNI proxy with TCP multiplexer";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|