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