at 25.11-pre 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cargo, 5 fetchFromGitHub, 6 hypothesis, 7 pytestCheckHook, 8 pythonOlder, 9 rustc, 10 rustPlatform, 11}: 12 13buildPythonPackage rec { 14 pname = "jh2"; 15 version = "5.0.9"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.10"; 19 20 src = fetchFromGitHub { 21 owner = "jawah"; 22 repo = "h2"; 23 tag = "v${version}"; 24 hash = "sha256-PA2hv+PIqcsvAIh8yIoQjol+Iaa3qsNRE8rBnR4UOzY="; 25 fetchSubmodules = true; 26 }; 27 28 cargoDeps = rustPlatform.fetchCargoVendor { 29 inherit src; 30 name = "${pname}-${version}"; 31 hash = "sha256-CW95omstpWm76TTSKsb04iChU0EW1Vl+OA3QXxfZAX0="; 32 }; 33 34 build-system = [ 35 cargo 36 rustPlatform.cargoSetupHook 37 rustPlatform.maturinBuildHook 38 rustc 39 ]; 40 41 nativeCheckInputs = [ 42 hypothesis 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "jh2" ]; 47 48 meta = { 49 description = "HTTP/2 State-Machine based protocol implementation"; 50 homepage = "https://github.com/jawah/h2"; 51 changelog = "https://github.com/jawah/h2/blob/${src.rev}/CHANGELOG.rst"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ 54 fab 55 techknowlogick 56 ]; 57 }; 58}