Files
nixpkgs/pkgs/development/python-modules/json-repair/default.nix
2025-09-20 14:21:59 +00:00

39 lines
883 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "json-repair";
version = "0.51.0";
pyproject = true;
src = fetchFromGitHub {
owner = "mangiucugna";
repo = "json_repair";
tag = "v${version}";
hash = "sha256-XXbJwzvt2gQox1+vQsJ3ajVoFlJVG/z2eUECQkWOi64=";
};
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [
"tests/test_performance.py"
];
pythonImportsCheck = [ "json_repair" ];
meta = with lib; {
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 = licenses.mit;
maintainers = with maintainers; [ greg ];
};
}