summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-02-18 18:11:34 -0800
committerWilliam A. Kennington III <william@wkennington.com>2015-02-18 18:15:51 -0800
commit47f9a276c3d1f34f37e0f61a62e350e22f44ae7b (patch)
tree00d9ae568b090c3f0cc8068421b32df4942f7a16 /pkgs/tools/graphics
parentf94d0c3aa7a61c1b77e6994adb586f1f2c57f10c (diff)
downloadnixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar.gz
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar.bz2
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar.lz
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar.xz
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.tar.zst
nixlib-47f9a276c3d1f34f37e0f61a62e350e22f44ae7b.zip
graphviz: Add a no x dependency version
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index 5fecd69d8026..31945c9f232c 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw
-, yacc, libtool, fontconfig, pango, gd, xlibs, gts, gettext, cairo
+, yacc, libtool, fontconfig, pango, gd, xlibs, gts, libdevil, gettext, cairo
 }:
 
 stdenv.mkDerivation rec {
@@ -14,12 +14,12 @@ stdenv.mkDerivation rec {
   patches = [ ./0001-vimdot-lookup-vim-in-PATH.patch ];
 
   buildInputs =
-    [ pkgconfig libpng libjpeg expat libXaw yacc libtool fontconfig
-      pango gd gts
-    ] ++ stdenv.lib.optionals (xlibs != null) [ xlibs.xlibs xlibs.libXrender ]
+    [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil
+    ] ++ stdenv.lib.optionals (xlibs != null) [ xlibs.xlibs xlibs.libXrender pango libXaw ]
     ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext;
 
-  CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo}/include/cairo";
+  CPPFLAGS = stdenv.lib.optionalString (xlibs != null && stdenv.system == "x86_64-darwin")
+    "-I${cairo}/include/cairo";
 
   configureFlags =
     [ "--with-pngincludedir=${libpng}/include"
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
   '';
 
   # "command -v" is POSIX, "which" is not
-  postInstall = ''
+  postInstall = stdenv.lib.optionalString (xlibs != null) ''
     sed -i 's|`which lefty`|"'$out'/bin/lefty"|' $out/bin/dotty
     sed -i 's|which|command -v|' $out/bin/vimdot
   '';