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 23 24 - # for passthru.tests 25 - , exiv2 26 - , fltk 27 - , graphicsmagick 28 }: 29 30 let ··· 43 44 nativeBuildInputs = [ 45 autoreconfHook 46 pkg-config 47 python3 48 bison 49 flex 50 ]; 51 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 ]; 63 64 hardeningDisable = [ "fortify" ]; 65 ··· 70 71 enableParallelBuilding = true; 72 73 - CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) 74 - "-I${cairo.dev}/include/cairo"; 75 76 doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs 77 ··· 81 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 \ 87 ''; 88 89 passthru.tests = { ··· 92 pydot 93 pygraphviz 94 xdot 95 - ; 96 inherit 97 exiv2 98 fltk 99 graphicsmagick 100 - ; 101 }; 102 103 meta = with lib; { ··· 105 description = "Graph visualization tools"; 106 license = licenses.epl10; 107 platforms = platforms.unix; 108 - maintainers = with maintainers; [ bjornfor raskin ]; 109 }; 110 }
··· 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, 25 26 + # for passthru.tests 27 + exiv2, 28 + fltk, 29 + graphicsmagick, 30 }: 31 32 let ··· 45 46 nativeBuildInputs = [ 47 autoreconfHook 48 + makeWrapper 49 pkg-config 50 python3 51 bison 52 flex 53 ]; 54 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 + ]; 71 72 hardeningDisable = [ "fortify" ]; 73 ··· 78 79 enableParallelBuilding = true; 80 81 + CPPFLAGS = optionalString (withXorg && stdenv.hostPlatform.isDarwin) "-I${cairo.dev}/include/cairo"; 82 83 doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs 84 ··· 88 89 postFixup = optionalString withXorg '' 90 substituteInPlace $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" 96 ''; 97 98 passthru.tests = { ··· 101 pydot 102 pygraphviz 103 xdot 104 + ; 105 inherit 106 exiv2 107 fltk 108 graphicsmagick 109 + ; 110 }; 111 112 meta = with lib; { ··· 114 description = "Graph visualization tools"; 115 license = licenses.epl10; 116 platforms = platforms.unix; 117 + maintainers = with maintainers; [ 118 + bjornfor 119 + raskin 120 + ]; 121 }; 122 }