mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
python3Packages.jsonschema-rs: init at 0.29.1
This commit is contained in:
51
pkgs/development/python-modules/jsonschema-rs/default.nix
Normal file
51
pkgs/development/python-modules/jsonschema-rs/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user