2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
astroid,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
packaging,
|
|
|
|
poetry-core,
|
|
|
|
semver,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
toml,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requirements-detector";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.2.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "landscapeio";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "requirements-detector";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-qmrHFQRypBJOI1N6W/Dtc5ss9JGqoPhFlbqrLHcb6vc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
astroid
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
|
|
|
toml
|
2024-01-13 08:15:51 +00:00
|
|
|
semver
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "requirements_detector" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python tool to find and list requirements of a Python project";
|
|
|
|
homepage = "https://github.com/landscapeio/requirements-detector";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/landscapeio/requirements-detector/releases/tag/${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kamadorueda ];
|
2024-05-15 15:35:15 +00:00
|
|
|
mainProgram = "detect-requirements";
|
|
|
|
# https://github.com/landscapeio/requirements-detector/issues/48
|
|
|
|
broken = versionAtLeast astroid.version "3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|