From 6c5186cf9b6b7904a7a90a73572c63eebf7098b6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 9 Aug 2014 19:30:28 +0200 Subject: gnuplot: Reduce dependency bloat a bit --- pkgs/tools/graphics/gnuplot/default.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'pkgs/tools/graphics') 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 ]; -- cgit 1.4.1