nixpkgs/pkgs/tools/graphics/gnuplot/default.nix
Peter Simons c5179a098c Updated Gnuplot to version 4.2.5.
* Merged 'gnuplot' and 'gnuplotX' attributes into one that uses (getPkgConfig
   "gnuplot" "x11" false) to determine whether X11 support is desired or not.

 * Added Emacs as a build-time dependency to ensure that Gnuplot's lisp code is
   installed, too.

 * Added optional support for the wxt terminal by means of (getPkgConfig
   "gnuplot" "wxGtk" false).

 * Removed the '-nix' suffix to the package name. The Gnuplot license requires
   a vendor-specific version suffix only in case of modified binary
   distributions. That is not the case here.

svn path=/nixpkgs/trunk/; revision=16992
2009-09-09 09:36:03 +00:00

34 lines
829 B
Nix

{ stdenv, fetchurl, zlib, gd, texinfo
, emacs ? null
, libX11 ? null
, libXt ? null
, libXpm ? null
, libXaw ? null
, wxGTK ? null
, pango ? null
, cairo ? null
, pkgconfig ? null
, x11Support ? false
, readline
}:
assert x11Support -> ((libX11 != null) &&
(libXt != null) && (libXpm != null) &&
(libXaw != null));
assert (wxGTK != null) -> x11Support;
stdenv.mkDerivation {
name = "gnuplot-4.2.5";
src = fetchurl {
url = "mirror://sourceforge/gnuplot/gnuplot-4.2.5.tar.gz";
sha256 = "1y0imxy9bflzny98n1wvv19bqxfsvsxbl8z12k46qnna0vg7wiw9";
};
configureFlags = if x11Support then ["--with-x"] else ["--without-x"];
buildInputs = [zlib gd texinfo readline emacs] ++
(if x11Support then [libX11 libXt libXpm libXaw] else []) ++
(if wxGTK != null then [wxGTK pango cairo pkgconfig] else []);
}