3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/h2/default.nix

53 lines
1 KiB
Nix
Raw Normal View History

2021-06-19 12:57:09 +01:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, fetchpatch
, hpack
, hyperframe
, pytestCheckHook
, hypothesis
}:
2017-11-02 23:33:38 +00:00
buildPythonPackage rec {
pname = "h2";
2020-11-29 14:04:30 +00:00
version = "4.0.0";
2021-06-19 12:57:09 +01:00
format = "setuptools";
disabled = pythonOlder "3.6";
2017-11-02 23:33:38 +00:00
src = fetchPypi {
inherit pname version;
2020-11-29 14:04:30 +00:00
sha256 = "bb7ac7099dd67a857ed52c815a6192b6b1f5ba6b516237fc24a085341340593d";
2017-11-02 23:33:38 +00:00
};
2021-06-19 12:48:58 +01: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";
})
];
2021-06-19 12:57:09 +01:00
propagatedBuildInputs = [
hpack
hyperframe
];
checkInputs = [
pytestCheckHook
hypothesis
];
2017-11-02 23:33:38 +00:00
pythonImportsCheck = [
2021-06-19 12:57:09 +01:00
"h2.connection"
"h2.config"
];
2020-11-29 19:25:18 +00:00
meta = with lib; {
2017-11-02 23:33:38 +00:00
description = "HTTP/2 State-Machine based protocol implementation";
homepage = "http://hyper.rtfd.org/";
license = licenses.mit;
};
}