python3Packages.jsonschema-rs: init at 0.29.1

This commit is contained in:
Wolfgang Walther
2025-03-10 16:57:39 +01:00
parent b88254659b
commit ddacf10c7c
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
{
buildPythonPackage,
fetchPypi,
hypothesis,
lib,
pytestCheckHook,
pythonOlder,
rustPlatform,
}:
buildPythonPackage rec {
pname = "jsonschema-rs";
version = "0.29.1";
pyproject = true;
disabled = pythonOlder "3.8";
# Fetching from Pypi, because there is no Cargo.lock in the GitHub repo.
src = fetchPypi {
inherit version;
pname = "jsonschema_rs";
hash = "sha256-qfiWqeRRdjA3TxdTZHBYNsIvCdW9W7sG7AYRMytnAv0=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
name = "${pname}-${version}";
hash = "sha256-kVi4EFig0ZGnOSVjzfJuGeR7BiEngP1Jhj6NvbhMVy4=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
nativeCheckInputs = [
hypothesis
pytestCheckHook
];
pythonImportsCheck = [ "jsonschema_rs" ];
meta = {
description = "High-performance JSON Schema validator for Python";
homepage = "https://github.com/Stranger6667/jsonschema/tree/master/crates/jsonschema-py";
changelog = "https://github.com/Stranger6667/jsonschema/blob/python-v${version}/crates/jsonschema-py/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = lib.teams.apm.members;
};
}

View File

@@ -6917,6 +6917,8 @@ self: super: with self; {
jsonschema-path = callPackage ../development/python-modules/jsonschema-path { };
jsonschema-rs = callPackage ../development/python-modules/jsonschema-rs { };
jsonschema-spec = callPackage ../development/python-modules/jsonschema-spec { };
jsonschema-specifications = callPackage ../development/python-modules/jsonschema-specifications { };