Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / h2 / default.nix
blobbb37c4d1607b02287d711fe90051b21fd602cc95
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchPypi
5 , fetchpatch
6 , hpack
7 , hyperframe
8 , pytestCheckHook
9 , hypothesis
12 buildPythonPackage rec {
13   pname = "h2";
14   version = "4.1.0";
15   format = "setuptools";
17   disabled = pythonOlder "3.6";
19   src = fetchPypi {
20     inherit pname version;
21     hash = "sha256-qDrKCPvnqst5/seIycC6yTY0NWDtnsGLgqE6EsKNKrs=";
22   };
24   patches = [
25     # https://github.com/python-hyper/h2/pull/1274
26     (fetchpatch {
27       name = "fix-tests-in-python-3.11.patch";
28       url = "https://github.com/python-hyper/h2/commit/8952c91606cd014720ccf202a25b5ee1fbed1591.patch";
29       hash = "sha256-skAdAVHMZo1xJEqqKa6FOKPvoQQbGUgGsQjE11jIjtw=";
30     })
31   ];
33   propagatedBuildInputs = [
34     hpack
35     hyperframe
36   ];
38   nativeCheckInputs = [
39     pytestCheckHook
40     hypothesis
41   ];
43   disabledTests = [
44     # timing sensitive
45     "test_changing_max_frame_size"
46   ];
48   pythonImportsCheck = [
49     "h2.connection"
50     "h2.config"
51   ];
53   meta = with lib; {
54     description = "HTTP/2 State-Machine based protocol implementation";
55     homepage = "https://github.com/python-hyper/h2";
56     license = licenses.mit;
57     maintainers = with maintainers; [ ];
58   };