1{ 2 lib, 3 buildPythonPackage, 4 cargo, 5 fetchFromGitHub, 6 poetry-core, 7 pytestCheckHook, 8 rustc, 9 rustPlatform, 10}: 11 12buildPythonPackage rec { 13 pname = "fast-query-parsers"; 14 version = "1.0.3"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "litestar-org"; 19 repo = "fast-query-parsers"; 20 tag = "v${version}"; 21 hash = "sha256-08xL0sOmUzsZYtM1thYUV93bj9ERr3LaVrW46zBrzeE="; 22 }; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit src; 26 name = "${pname}-${version}"; 27 hash = "sha256-kp5bCmHYMS/e8eM6HrRw0JlVaxwPscFGDLQ0PX4ZIC4="; 28 }; 29 30 build-system = [ 31 cargo 32 poetry-core 33 rustPlatform.cargoSetupHook 34 rustPlatform.maturinBuildHook 35 rustc 36 ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 pythonImportsCheck = [ "fast_query_parsers" ]; 41 42 meta = { 43 description = "Ultra-fast query string and url-encoded form-data parsers"; 44 homepage = "https://github.com/litestar-org/fast-query-parsers"; 45 changelog = "https://github.com/litestar-org/fast-query-parsers/releases/tag/${src.tag}"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ fab ]; 48 }; 49}