{ lib, buildPythonPackage, fetchFromGitHub, setuptools, pytestCheckHook, }: buildPythonPackage rec { pname = "json-repair"; version = "0.52.5"; pyproject = true; src = fetchFromGitHub { owner = "mangiucugna"; repo = "json_repair"; tag = "v${version}"; hash = "sha256-+WWGykTu7hOMgVKr16oay90ZkI9tYnJfluzaETpOcRw="; }; build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; 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/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ greg ]; mainProgram = "json_repair"; }; }