about summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-09 19:30:28 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-09 19:30:48 +0200
commit6c5186cf9b6b7904a7a90a73572c63eebf7098b6 (patch)
tree68ec3dac1558dccb64c51ef9790aef30651192bf /pkgs/tools/graphics
parenta1a96d8744df2d744adea7aa94ffdfb8651da994 (diff)
downloadnixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar.gz
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar.bz2
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar.lz
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar.xz
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.tar.zst
nixlib-6c5186cf9b6b7904a7a90a73572c63eebf7098b6.zip
gnuplot: Reduce dependency bloat a bit
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/gnuplot/default.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix
index 58e023a6aaa7..164b3ba1d284 100644
--- a/pkgs/tools/graphics/gnuplot/default.nix
+++ b/pkgs/tools/graphics/gnuplot/default.nix
@@ -1,25 +1,24 @@
-{ stdenv, fetchurl, zlib, gd, texinfo, makeWrapper, readline
-, texLive ? null
-, lua ? null
+{ lib, stdenv, fetchurl, zlib, gd, texinfo4, makeWrapper, readline
+, withTeXLive ? false, texLive
+, withLua ? false, lua
 , emacs ? null
 , libX11 ? null
 , libXt ? null
 , libXpm ? null
 , libXaw ? null
 , aquaterm ? false
-, wxGTK ? null
+, withWxGTK ? false, wxGTK ? null
 , pango ? null
 , cairo ? null
 , pkgconfig ? null
 , fontconfig ? null
 , gnused ? null
 , coreutils ? null
-, qt ? null }:
+, withQt ? false, qt4 }:
 
 assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
 let
   withX = libX11 != null && !aquaterm;
-  withQt = qt != null;
 in
 stdenv.mkDerivation rec {
   name = "gnuplot-4.6.5";
@@ -30,20 +29,21 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ zlib gd texinfo readline emacs lua texLive
+    [ zlib gd texinfo4 readline
       pango cairo pkgconfig makeWrapper ]
-    ++ stdenv.lib.optionals withX              [ libX11 libXpm libXt libXaw ]
-    ++ stdenv.lib.optional withQt [ qt ]
+    ++ lib.optional withTeXLive texLive
+    ++ lib.optional withLua lua
+    ++ lib.optionals withX [ libX11 libXpm libXt libXaw ]
+    ++ lib.optional withQt [ qt4 ]
     # compiling with wxGTK causes a malloc (double free) error on darwin
-    ++ stdenv.lib.optional (!stdenv.isDarwin) wxGTK;
+    ++ lib.optional (withWxGTK && !stdenv.isDarwin) wxGTK;
 
   configureFlags =
     (if withX then ["--with-x"] else ["--without-x"])
     ++ (if withQt then ["--enable-qt"] else ["--disable-qt"])
-    ++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"])
-    ;
+    ++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"]);
 
-  postInstall = stdenv.lib.optionalString withX ''
+  postInstall = lib.optionalString withX ''
     wrapProgram $out/bin/gnuplot \
        --prefix PATH : '${gnused}/bin' \
        --prefix PATH : '${coreutils}/bin' \
@@ -51,8 +51,8 @@ stdenv.mkDerivation rec {
        --run '. ${./set-gdfontpath-from-fontconfig.sh}'
   '';
 
-  meta = with stdenv.lib; {
-    homepage    = http://www.gnuplot.info;
+  meta = with lib; {
+    homepage = http://www.gnuplot.info/;
     description = "A portable command-line driven graphing utility for many platforms";
     hydraPlatforms = platforms.linux ++ platforms.darwin;
     maintainers = with maintainers; [ lovek323 ];