graphviz: drop libXaw and libXpm dependencies, fix vimdot, format (#391802)

authored by 7c6f434c and committed by GitHub 75c5635a 59898e7e

+57 -45
+57 -45
pkgs/tools/graphics/graphviz/default.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitLab 4 - , autoreconfHook 5 - , pkg-config 6 - , cairo 7 - , expat 8 - , flex 9 - , fontconfig 10 - , gd 11 - , gts 12 - , libjpeg 13 - , libpng 14 - , libtool 15 - , pango 16 - , bash 17 - , bison 18 - , xorg 19 - , ApplicationServices 20 - , Foundation 21 - , python3 22 - , withXorg ? true 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitLab, 5 + autoreconfHook, 6 + pkg-config, 7 + cairo, 8 + expat, 9 + flex, 10 + fontconfig, 11 + gd, 12 + gts, 13 + libjpeg, 14 + libpng, 15 + libtool, 16 + makeWrapper, 17 + pango, 18 + bash, 19 + bison, 20 + xorg, 21 + ApplicationServices, 22 + Foundation, 23 + python3, 24 + withXorg ? true, 23 25 24 - # for passthru.tests 25 - , exiv2 26 - , fltk 27 - , graphicsmagick 26 + # for passthru.tests 27 + exiv2, 28 + fltk, 29 + graphicsmagick, 28 30 }: 29 31 30 32 let ··· 43 45 44 46 nativeBuildInputs = [ 45 47 autoreconfHook 48 + makeWrapper 46 49 pkg-config 47 50 python3 48 51 bison 49 52 flex 50 53 ]; 51 54 52 - buildInputs = [ 53 - libpng 54 - libjpeg 55 - expat 56 - fontconfig 57 - gd 58 - gts 59 - pango 60 - bash 61 - ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ]) 62 - ++ optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ]; 55 + buildInputs = 56 + [ 57 + libpng 58 + libjpeg 59 + expat 60 + fontconfig 61 + gd 62 + gts 63 + pango 64 + bash 65 + ] 66 + ++ optionals withXorg (with xorg; [ libXrender ]) 67 + ++ optionals stdenv.hostPlatform.isDarwin [ 68 + ApplicationServices 69 + Foundation 70 + ]; 63 71 64 72 hardeningDisable = [ "fortify" ]; 65 73 ··· 70 78 71 79 enableParallelBuilding = true; 72 80 73 - CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) 74 - "-I${cairo.dev}/include/cairo"; 81 + CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) "-I${cairo.dev}/include/cairo"; 75 82 76 83 doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs 77 84 ··· 81 88 82 89 postFixup = optionalString withXorg '' 83 90 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 \ 91 + --replace-warn '"/usr/bin/vi"' '"$(command -v vi)"' \ 92 + --replace-warn '"/usr/bin/vim"' '"$(command -v vim)"' \ 93 + --replace-warn /usr/bin/vimdot $out/bin/vimdot 94 + 95 + wrapProgram $out/bin/vimdot --prefix PATH : "$out/bin" 87 96 ''; 88 97 89 98 passthru.tests = { ··· 92 101 pydot 93 102 pygraphviz 94 103 xdot 95 - ; 104 + ; 96 105 inherit 97 106 exiv2 98 107 fltk 99 108 graphicsmagick 100 - ; 109 + ; 101 110 }; 102 111 103 112 meta = with lib; { ··· 105 114 description = "Graph visualization tools"; 106 115 license = licenses.epl10; 107 116 platforms = platforms.unix; 108 - maintainers = with maintainers; [ bjornfor raskin ]; 117 + maintainers = with maintainers; [ 118 + bjornfor 119 + raskin 120 + ]; 109 121 }; 110 122 }