2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
|
|
|
, hpack
|
|
|
|
, hyperframe
|
|
|
|
, pytestCheckHook
|
|
|
|
, hypothesis
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "h2";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "4.0.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "bb7ac7099dd67a857ed52c815a6192b6b1f5ba6b516237fc24a085341340593d";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
patches = [
|
|
|
|
# Workaround issues with hypothesis 6.6
|
|
|
|
# https://github.com/python-hyper/h2/pull/1248
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/python-hyper/h2/commit/0646279dab694a89562846c810202ce2c0b49be3.patch";
|
|
|
|
sha256 = "1k0fsxwq9wbv15sc9ixls4qmxxghlzpflf3awm66ar9m2ikahiak";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
hpack
|
|
|
|
hyperframe
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
pythonImportsCheck = [
|
2021-06-28 23:13:55 +00:00
|
|
|
"h2.connection"
|
|
|
|
"h2.config"
|
|
|
|
];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTTP/2 State-Machine based protocol implementation";
|
|
|
|
homepage = "http://hyper.rtfd.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|