1{
2 lib,
3 astroid,
4 buildPythonPackage,
5 fetchFromGitHub,
6 packaging,
7 poetry-core,
8 semver,
9 pytestCheckHook,
10 pythonOlder,
11 toml,
12}:
13
14buildPythonPackage rec {
15 pname = "requirements-detector";
16 version = "1.2.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "landscapeio";
23 repo = "requirements-detector";
24 rev = "refs/tags/${version}";
25 hash = "sha256-qmrHFQRypBJOI1N6W/Dtc5ss9JGqoPhFlbqrLHcb6vc=";
26 };
27
28 build-system = [ poetry-core ];
29
30 dependencies = [
31 astroid
32 packaging
33 toml
34 semver
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "requirements_detector" ];
40
41 meta = with lib; {
42 description = "Python tool to find and list requirements of a Python project";
43 homepage = "https://github.com/landscapeio/requirements-detector";
44 changelog = "https://github.com/landscapeio/requirements-detector/releases/tag/${version}";
45 license = licenses.mit;
46 maintainers = with maintainers; [ kamadorueda ];
47 mainProgram = "detect-requirements";
48 # https://github.com/landscapeio/requirements-detector/issues/48
49 broken = versionAtLeast astroid.version "3";
50 };
51}