2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pint,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
toml,
|
|
|
|
tomli,
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vulture";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2.11";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-8Pu2C85lEarYfuBzbFAkVnN0kKgtkZpE5tkiYss18cI=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov vulture --cov-report=html --cov-report=term --cov-report=xml --cov-append" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ tomli ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pint
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
toml
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "vulture" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Finds unused code in Python programs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "vulture";
|
2020-08-20 17:08:02 +00:00
|
|
|
homepage = "https://github.com/jendrikseipp/vulture";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/jendrikseipp/vulture/releases/tag/v${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mcwitt ];
|
|
|
|
};
|
|
|
|
}
|