mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
41 lines
944 B
Nix
41 lines
944 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "json-repair";
|
|
version = "0.55.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mangiucugna";
|
|
repo = "json_repair";
|
|
tag = "v${version}";
|
|
hash = "sha256-yQ+btSuifrtr0y5GRcLY0SUEp3LQXdpvaxa6ZorA/Q8=";
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|