2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
unittestCheckHook,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
|
|
|
isPy27,
|
|
|
|
pythonAtLeast,
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tornado";
|
|
|
|
version = "4.5.3";
|
2022-09-09 14:08:57 +00:00
|
|
|
disabled = isPy27 || pythonAtLeast "3.10";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d";
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2023-28370.patch";
|
|
|
|
url = "https://github.com/tornadoweb/tornado/commit/32ad07c54e607839273b4e1819c347f5c8976b2f.patch";
|
|
|
|
hash = "sha256-2dpPHkNThOaZD8T2g1vb/I5WYZ/vy/t690539uprJyc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
# We specify the name of the test files to prevent
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/14634
|
|
|
|
unittestFlagsArray = [ "*_test.py" ];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A web framework and asynchronous networking library";
|
|
|
|
homepage = "https://www.tornadoweb.org/";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|