about summary refs log tree commit diff
path: root/pkgs/tools/graphics/gnuplot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics/gnuplot/default.nix')
-rw-r--r--pkgs/tools/graphics/gnuplot/default.nix15
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix
index c41bf032a60b..e0f9ce2a2bf7 100644
--- a/pkgs/tools/graphics/gnuplot/default.nix
+++ b/pkgs/tools/graphics/gnuplot/default.nix
@@ -6,6 +6,7 @@
 , libXt ? null
 , libXpm ? null
 , libXaw ? null
+, aquaterm ? false
 , wxGTK ? null
 , pango ? null
 , cairo ? null
@@ -15,7 +16,9 @@
 , coreutils ? null }:
 
 assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
-
+let
+  withX = libX11 != null && !aquaterm;
+in
 stdenv.mkDerivation rec {
   name = "gnuplot-4.6.3";
 
@@ -25,14 +28,18 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ zlib gd texinfo readline emacs lua texLive libX11 libXt libXpm libXaw
+    [ zlib gd texinfo readline emacs lua texLive
       pango cairo pkgconfig makeWrapper ]
+    ++ stdenv.lib.optionals withX              [ libX11 libXpm libXt libXaw ]
     # compiling with wxGTK causes a malloc (double free) error on darwin
     ++ stdenv.lib.optional (!stdenv.isDarwin) wxGTK;
 
-  configureFlags = if libX11 != null then ["--with-x"] else ["--without-x"];
+  configureFlags =
+    (if withX then ["--with-x"] else ["--without-x"])
+    ++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"])
+    ;
 
-  postInstall = stdenv.lib.optionalString (libX11 != null) ''
+  postInstall = stdenv.lib.optionalString withX ''
     wrapProgram $out/bin/gnuplot \
        --prefix PATH : '${gnused}/bin' \
        --prefix PATH : '${coreutils}/bin' \