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