at 22.05-pre 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, fetchpatch 6, hpack 7, hyperframe 8, pytestCheckHook 9, hypothesis 10}: 11 12buildPythonPackage rec { 13 pname = "h2"; 14 version = "4.0.0"; 15 format = "setuptools"; 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "bb7ac7099dd67a857ed52c815a6192b6b1f5ba6b516237fc24a085341340593d"; 21 }; 22 23 patches = [ 24 # Workaround issues with hypothesis 6.6 25 # https://github.com/python-hyper/h2/pull/1248 26 (fetchpatch { 27 url = "https://github.com/python-hyper/h2/commit/0646279dab694a89562846c810202ce2c0b49be3.patch"; 28 sha256 = "1k0fsxwq9wbv15sc9ixls4qmxxghlzpflf3awm66ar9m2ikahiak"; 29 }) 30 ]; 31 32 propagatedBuildInputs = [ 33 hpack 34 hyperframe 35 ]; 36 37 checkInputs = [ 38 pytestCheckHook 39 hypothesis 40 ]; 41 42 pythonImportsCheck = [ 43 "h2.connection" 44 "h2.config" 45 ]; 46 47 meta = with lib; { 48 description = "HTTP/2 State-Machine based protocol implementation"; 49 homepage = "http://hyper.rtfd.org/"; 50 license = licenses.mit; 51 }; 52}