54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
hypothesis,
|
|
lib,
|
|
nix-update-script,
|
|
pytestCheckHook,
|
|
rustPlatform,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "jsonschema-rs";
|
|
version = "0.39.0";
|
|
|
|
pyproject = true;
|
|
|
|
# Fetching from Pypi, because there is no Cargo.lock in the GitHub repo.
|
|
src = fetchPypi {
|
|
inherit version;
|
|
pname = "jsonschema_rs";
|
|
hash = "sha256-K+7QayZF5O6cO6fl23CnYCi6jJl4plSwdl5nji1sbfM=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-2YNunqzejzDCj7mv9S8g/kY+t39YtQQ2jMeeTwc+NCs=";
|
|
};
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
hypothesis
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "jsonschema_rs" ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
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 = with lib.maintainers; [
|
|
DutchGerman
|
|
friedow
|
|
];
|
|
};
|
|
}
|