1{
2 lib,
3 fetchFromGitHub,
4 nix,
5 python,
6 matplotlib,
7 networkx,
8 pandas,
9 pygraphviz,
10 setuptools,
11}:
12
13python.pkgs.buildPythonApplication {
14 version = "1.0.5-unstable-2024-01-17";
15 pname = "nix-visualize";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "craigmbooth";
20 repo = "nix-visualize";
21 rev = "5b9beae330ac940df56433d347494505e2038904";
22 hash = "sha256-VgEsR/Odddc7v6oq2tNcVwCYm08PhiqhZJueuEYCR0o=";
23 };
24
25 postInstall = ''
26 wrapProgram $out/bin/nix-visualize \
27 --prefix PATH : ${lib.makeBinPath [ nix ]}
28 '';
29
30 nativeBuildInputs = [ setuptools ];
31
32 propagatedBuildInputs = [
33 matplotlib
34 networkx
35 pandas
36 pygraphviz
37 ];
38
39 pythonImportsCheck = [ "nix_visualize" ];
40 # No tests
41 doCheck = false;
42
43 meta = with lib; {
44 description = "Generate dependency graphs of a given nix package";
45 mainProgram = "nix-visualize";
46 homepage = "https://github.com/craigmbooth/nix-visualize";
47 license = with licenses; [ asl20 ];
48 maintainers = with maintainers; [ henrirosten ];
49 };
50}