summary refs log tree commit diff
path: root/pkgs/tools/graphics/gnuplot
diff options
context:
space:
mode:
authorEric Kow <eric.kow@gmail.com>2013-11-10 13:43:43 +0000
committerEric Kow <eric.kow@gmail.com>2013-11-10 13:43:43 +0000
commit9f7510113e7ad92128c1a7464f092787a08c1c82 (patch)
treeb5bd4a2bad82ec7a5eb0d61913fd976988b0805a /pkgs/tools/graphics/gnuplot
parent9a97b842c5962907def8a3ed086ba6bb29d5bd98 (diff)
downloadnixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar.gz
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar.bz2
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar.lz
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar.xz
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.tar.zst
nixlib-9f7510113e7ad92128c1a7464f092787a08c1c82.zip
gnuplot darwin: optional gnuplot_aquaterm variant
This variant uses the more Mac-friendly aqua driver, but it requires
that you separately install the AquaTerm package.

Note that AquaTerm is open source and could perhaps be later included
as a nix derivation. If that happens, it would be nice to remove the
gnuplot_aquaterm top-level attribute and just make it the default.
Diffstat (limited to 'pkgs/tools/graphics/gnuplot')
-rw-r--r--pkgs/tools/graphics/gnuplot/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix
index 23d57f5b6521..beb32ed9bea3 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
@@ -24,15 +25,18 @@ stdenv.mkDerivation rec {
     sha256 = "1xd7gqdhlk7k1p9yyqf9vkk811nadc7m4si0q3nb6cpv4pxglpyz";
   };
 
+  withX = libX11 != null && !aquaterm;
+
   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"];
 
-  postInstall = stdenv.lib.optionalString (libX11 != null) ''
+  postInstall = stdenv.lib.optionalString withX ''
     wrapProgram $out/bin/gnuplot \
        --prefix PATH : '${gnused}/bin' \
        --prefix PATH : '${coreutils}/bin' \