2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
lxml,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "justext";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.0.1";
|
2024-02-29 20:09:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miso-belica";
|
|
|
|
repo = "jusText";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-9i7hzCK/ijh8xw9l2ZbVhVj5IBf0WD/49/R1tSWgqrQ=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ lxml ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# patch out coverage report
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov=justext --cov-report=term-missing --no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "justext" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Heuristic based boilerplate removal tool";
|
|
|
|
homepage = "https://github.com/miso-belica/jusText";
|
|
|
|
changelog = "https://github.com/miso-belica/jusText/blob/v${version}/CHANGELOG.rst";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ jokatzke ];
|
|
|
|
};
|
|
|
|
}
|