Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pipdeptree / default.nix
blob7e15814fa684946cea2df46bd9b023dd899a4981
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
15 buildPythonPackage rec {
16   pname = "pipdeptree";
17   version = "2.13.1";
18   format = "pyproject";
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "tox-dev";
24     repo = "pipdeptree";
25     rev = "refs/tags/${version}";
26     hash = "sha256-rlnJmGe9LYwIJxV02IjiKtT1iS1O9ik8dAfjsPHsa8U=";
27   };
29   SETUPTOOLS_SCM_PRETEND_VERSION = version;
31   nativeBuildInputs = [
32     hatchling
33     hatch-vcs
34   ];
36   propagatedBuildInputs = [
37     pip
38   ];
40   passthru.optional-dependencies = {
41     graphviz = [
42       graphviz
43     ];
44   };
46   nativeCheckInputs = [
47     diff-cover
48     pytest-mock
49     pytestCheckHook
50     virtualenv
51   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
53   pythonImportsCheck = [
54     "pipdeptree"
55   ];
57   disabledTests = [
58     # Don't run console tests
59     "test_console"
60   ];
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   };