1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 diff-cover, 7 graphviz, 8 hatchling, 9 hatch-vcs, 10 packaging, 11 pytest-mock, 12 pytestCheckHook, 13 pip, 14 virtualenv, 15}: 16 17buildPythonPackage rec { 18 pname = "pipdeptree"; 19 version = "2.20.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "tox-dev"; 26 repo = "pipdeptree"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-Mng5YUM2+T3OFrr4uGVvq5mP0aq10r21pp46tw6lLno="; 29 }; 30 31 build-system = [ 32 hatchling 33 hatch-vcs 34 ]; 35 36 dependencies = [ 37 pip 38 packaging 39 ]; 40 41 passthru.optional-dependencies = { 42 graphviz = [ graphviz ]; 43 }; 44 45 nativeCheckInputs = [ 46 diff-cover 47 pytest-mock 48 pytestCheckHook 49 virtualenv 50 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 51 52 pythonImportsCheck = [ "pipdeptree" ]; 53 54 disabledTests = [ 55 # Don't run console tests 56 "test_console" 57 ]; 58 59 meta = with lib; { 60 description = "Command line utility to show dependency tree of packages"; 61 homepage = "https://github.com/tox-dev/pipdeptree"; 62 changelog = "https://github.com/tox-dev/pipdeptree/releases/tag/${version}"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ charlesbaynham ]; 65 mainProgram = "pipdeptree"; 66 }; 67}