Unverified Commit 72c38f95 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

python3Packages.jsonschema-rs: init at 0.29.1 (#388746)

parents b8f128cf ddacf10c
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
{
  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;
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -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 { };