Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildPythonPackage, 3 fetchPypi, 4 hypothesis, 5 lib, 6 nix-update-script, 7 pytestCheckHook, 8 pythonOlder, 9 rustPlatform, 10}: 11 12buildPythonPackage rec { 13 pname = "jsonschema-rs"; 14 version = "0.30.0"; 15 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 # Fetching from Pypi, because there is no Cargo.lock in the GitHub repo. 21 src = fetchPypi { 22 inherit version; 23 pname = "jsonschema_rs"; 24 hash = "sha256-KfmI0ik3HWrv1WDFsT5xvxyRyXKg2DpmxeuUHOR9MZM="; 25 }; 26 27 cargoDeps = rustPlatform.fetchCargoVendor { 28 inherit pname version src; 29 hash = "sha256-LNT2wQnOaVMBrI+fW6wbIRaTYPvw3ESinI5KY8wjp1o="; 30 }; 31 32 nativeBuildInputs = with rustPlatform; [ 33 cargoSetupHook 34 maturinBuildHook 35 ]; 36 37 nativeCheckInputs = [ 38 hypothesis 39 pytestCheckHook 40 ]; 41 42 pythonImportsCheck = [ "jsonschema_rs" ]; 43 44 passthru.updateScript = nix-update-script { }; 45 46 meta = { 47 description = "High-performance JSON Schema validator for Python"; 48 homepage = "https://github.com/Stranger6667/jsonschema/tree/master/crates/jsonschema-py"; 49 changelog = "https://github.com/Stranger6667/jsonschema/blob/python-v${version}/crates/jsonschema-py/CHANGELOG.md"; 50 license = lib.licenses.mit; 51 teams = [ lib.teams.apm ]; 52 }; 53}