31 inherit (lib) optional optionals optionalString;
33 stdenv.mkDerivation rec {
37 src = fetchFromGitLab {
41 hash = "sha256-BSqCI9nIDjymPbCPWGFdWmqfyjuTkIsL1r0qv+Qjy10=";
61 ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ])
62 ++ optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ];
64 hardeningDisable = [ "fortify" ];
67 "--with-ltdl-lib=${libtool.lib}/lib"
68 "--with-ltdl-include=${libtool}/include"
69 ] ++ optional (xorg == null) "--without-x";
71 enableParallelBuilding = true;
73 CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin)
74 "-I${cairo.dev}/include/cairo";
76 doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs
82 postFixup = optionalString withXorg ''
83 substituteInPlace $out/bin/vimdot \
84 --replace '"/usr/bin/vi"' '"$(command -v vi)"' \
85 --replace '"/usr/bin/vim"' '"$(command -v vim)"' \
86 --replace /usr/bin/vimdot $out/bin/vimdot \
90 inherit (python3.pkgs)
104 homepage = "https://graphviz.org";
105 description = "Graph visualization tools";
106 license = licenses.epl10;
107 platforms = platforms.unix;
108 maintainers = with maintainers; [ bjornfor raskin ];