diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index d612a7f3fcdf..bcd13cfff089 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -1,30 +1,32 @@ -{ lib -, stdenv -, fetchFromGitLab -, autoreconfHook -, pkg-config -, cairo -, expat -, flex -, fontconfig -, gd -, gts -, libjpeg -, libpng -, libtool -, pango -, bash -, bison -, xorg -, ApplicationServices -, Foundation -, python3 -, withXorg ? true +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + cairo, + expat, + flex, + fontconfig, + gd, + gts, + libjpeg, + libpng, + libtool, + makeWrapper, + pango, + bash, + bison, + xorg, + ApplicationServices, + Foundation, + python3, + withXorg ? true, -# for passthru.tests -, exiv2 -, fltk -, graphicsmagick + # for passthru.tests + exiv2, + fltk, + graphicsmagick, }: let @@ -43,23 +45,29 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook + makeWrapper pkg-config python3 bison flex ]; - buildInputs = [ - libpng - libjpeg - expat - fontconfig - gd - gts - pango - bash - ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ]) - ++ optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; + buildInputs = + [ + libpng + libjpeg + expat + fontconfig + gd + gts + pango + bash + ] + ++ optionals withXorg (with xorg; [ libXrender ]) + ++ optionals stdenv.hostPlatform.isDarwin [ + ApplicationServices + Foundation + ]; hardeningDisable = [ "fortify" ]; @@ -70,8 +78,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) - "-I${cairo.dev}/include/cairo"; + CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) "-I${cairo.dev}/include/cairo"; doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs @@ -81,9 +88,11 @@ stdenv.mkDerivation rec { postFixup = optionalString withXorg '' substituteInPlace $out/bin/vimdot \ - --replace '"/usr/bin/vi"' '"$(command -v vi)"' \ - --replace '"/usr/bin/vim"' '"$(command -v vim)"' \ - --replace /usr/bin/vimdot $out/bin/vimdot \ + --replace-warn '"/usr/bin/vi"' '"$(command -v vi)"' \ + --replace-warn '"/usr/bin/vim"' '"$(command -v vim)"' \ + --replace-warn /usr/bin/vimdot $out/bin/vimdot + + wrapProgram $out/bin/vimdot --prefix PATH : "$out/bin" ''; passthru.tests = { @@ -92,12 +101,12 @@ stdenv.mkDerivation rec { pydot pygraphviz xdot - ; + ; inherit exiv2 fltk graphicsmagick - ; + ; }; meta = with lib; { @@ -105,6 +114,9 @@ stdenv.mkDerivation rec { description = "Graph visualization tools"; license = licenses.epl10; platforms = platforms.unix; - maintainers = with maintainers; [ bjornfor raskin ]; + maintainers = with maintainers; [ + bjornfor + raskin + ]; }; }