writers: add writeGuile[Bin] (#364531)
[NixPkgs.git] / pkgs / development / python-modules / pydeps / default.nix
blobf2633d060b14acf771d8f0af703196343a2f491b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   graphviz,
6   stdlib-list,
7   pytestCheckHook,
8   pythonOlder,
9   pyyaml,
10   setuptools,
11   toml,
14 buildPythonPackage rec {
15   pname = "pydeps";
16   version = "2.0.1";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "thebjorn";
23     repo = "pydeps";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-ZLFcaWzu8iYBnbSh1Ua4fvFyYD5q71R/iIqzRUKRn1E=";
26   };
28   build-system = [ setuptools ];
30   buildInputs = [ graphviz ];
32   dependencies = [
33     graphviz
34     stdlib-list
35   ];
37   nativeCheckInputs = [
38     pytestCheckHook
39     pyyaml
40     toml
41   ];
43   postPatch = ''
44     # Path is hard-coded
45     substituteInPlace pydeps/dot.py \
46       --replace "dot -Gstart=1" "${lib.makeBinPath [ graphviz ]}/dot -Gstart=1"
47   '';
49   disabledTests = [
50     # Would require to have additional modules available
51     "test_find_package_names"
52   ];
54   pythonImportsCheck = [ "pydeps" ];
56   meta = with lib; {
57     description = "Python module dependency visualization";
58     homepage = "https://github.com/thebjorn/pydeps";
59     changelog = "https://github.com/thebjorn/pydeps/releases/tag/v${version}";
60     license = licenses.bsd2;
61     maintainers = with maintainers; [ fab ];
62     mainProgram = "pydeps";
63   };