Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{ lib, buildPythonPackage, fetchFromGitHub, jsonschema, setuptools, pydantic, pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "json-repair"; version = "0.64.1"; pyproject = true;
src = fetchFromGitHub { owner = "mangiucugna"; repo = "json_repair"; tag = "v${finalAttrs.version}"; hash = "sha256-ceWp6dz8YovvktIUIOAUP5pUIrBGbwiik9LaClRzLmo="; };
build-system = [ setuptools ];
optional-dependencies.schema = [ jsonschema pydantic ];
nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
disabledTestPaths = [ # Disable benchmark tests "tests/test_performance.py" ];
pythonImportsCheck = [ "json_repair" ];
meta = { description = "Module to repair invalid JSON, commonly used to parse the output of LLMs"; homepage = "https://github.com/mangiucugna/json_repair/"; changelog = "https://github.com/mangiucugna/json_repair/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ greg ]; mainProgram = "json_repair"; };})