lol
at v206 70 lines 2.5 kB view raw
1{ stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw 2, yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo 3, flex 4}: 5 6stdenv.mkDerivation rec { 7 version = "2.38.0"; 8 name = "graphviz-${version}"; 9 10 src = fetchurl { 11 url = "http://www.graphviz.org/pub/graphviz/ARCHIVE/${name}.tar.gz"; 12 sha256 = "17l5czpvv5ilmg17frg0w4qwf89jzh2aglm9fgx0l0aakn6j7al1"; 13 }; 14 15 patches = 16 [ ./0001-vimdot-lookup-vim-in-PATH.patch 17 18 # NOTE: Once this patch is removed, flex can probably be removed from 19 # buildInputs. 20 ./cve-2014-9157.patch 21 ]; 22 23 buildInputs = 24 [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex 25 ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender pango libXaw ] 26 ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; 27 28 CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin") 29 "-I${cairo}/include/cairo"; 30 31 configureFlags = 32 [ "--with-pngincludedir=${libpng}/include" 33 "--with-pnglibdir=${libpng}/lib" 34 "--with-jpegincludedir=${libjpeg}/include" 35 "--with-jpeglibdir=${libjpeg}/lib" 36 "--with-expatincludedir=${expat}/include" 37 "--with-expatlibdir=${expat}/lib" 38 ] 39 ++ stdenv.lib.optional (xorg == null) "--without-x"; 40 41 preBuild = '' 42 sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile 43 ''; 44 45 # "command -v" is POSIX, "which" is not 46 postInstall = stdenv.lib.optionalString (xorg != null) '' 47 sed -i 's|`which lefty`|"'$out'/bin/lefty"|' $out/bin/dotty 48 sed -i 's|which|command -v|' $out/bin/vimdot 49 ''; 50 51 meta = { 52 homepage = "http://www.graphviz.org/"; 53 description = "Open source graph visualization software"; 54 55 longDescription = '' 56 Graphviz is open source graph visualization software. Graph 57 visualization is a way of representing structural information as 58 diagrams of abstract graphs and networks. It has important 59 applications in networking, bioinformatics, software engineering, 60 database and web design, machine learning, and in visual 61 interfaces for other technical domains. 62 ''; 63 64 hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; 65 maintainers = with stdenv.lib.maintainers; [ simons bjornfor raskin ]; 66 downloadPage = "http://www.graphviz.org/pub/graphviz/ARCHIVE/"; 67 inherit version; 68 updateWalker = true; 69 }; 70}