1{ 2 lib, 3 astroid, 4 buildPythonPackage, 5 fetchFromGitHub, 6 fetchpatch, 7 packaging, 8 poetry-core, 9 semver, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "requirements-detector"; 16 version = "1.3.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.12"; 20 21 src = fetchFromGitHub { 22 owner = "landscapeio"; 23 repo = "requirements-detector"; 24 tag = version; 25 hash = "sha256-IWVIYDE/5/9sFgOFftRE4nmY0IDJ0oOvvaGMODkozQg="; 26 }; 27 28 patches = [ 29 # Remove duplicate import, https://github.com/prospector-dev/requirements-detector/pull/53 30 (fetchpatch { 31 name = "remove-import.patch"; 32 url = "https://github.com/prospector-dev/requirements-detector/commit/be412669f53a78b3376cac712c84f158fbb1374a.patch"; 33 hash = "sha256-IskSs3BZ1pTeqjtCUksC8wL+3fOYqAi7nw/QD0zsie4="; 34 }) 35 ]; 36 37 build-system = [ poetry-core ]; 38 39 dependencies = [ 40 astroid 41 packaging 42 semver 43 ]; 44 45 nativeCheckInputs = [ pytestCheckHook ]; 46 47 pythonImportsCheck = [ "requirements_detector" ]; 48 49 meta = with lib; { 50 description = "Python tool to find and list requirements of a Python project"; 51 homepage = "https://github.com/landscapeio/requirements-detector"; 52 changelog = "https://github.com/landscapeio/requirements-detector/releases/tag/${version}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ kamadorueda ]; 55 mainProgram = "detect-requirements"; 56 }; 57}