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
This commit is contained in:
Peter Simons 2009-09-09 09:36:03 +00:00
parent 1511a6f28c
commit c5179a098c
2 changed files with 19 additions and 17 deletions

View File

@ -1,30 +1,33 @@
{ 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) &&
assert x11Support -> ((libX11 != null) &&
(libXt != null) && (libXpm != null) &&
(libXaw != null));
stdenv.mkDerivation {
# Gnuplot (which isn't open source) has a license that requires that
# we "add special version identification to distinguish your version
# in addition to the base release version number". Hence the "nix"
# suffix.
name = "gnuplot-4.2.2-nix";
assert (wxGTK != null) -> x11Support;
stdenv.mkDerivation {
name = "gnuplot-4.2.5";
src = fetchurl {
url = mirror://sourceforge/gnuplot/gnuplot-4.2.2.tar.gz;
sha256 = "14ca8wwdb4hdsgs51fqlrkcny3d4rm1vs54sfg5d0hr7iw2qlvvm";
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] ++
(if x11Support then [libX11 libXt libXpm libXaw] else []);
buildInputs = [zlib gd texinfo readline emacs] ++
(if x11Support then [libX11 libXt libXpm libXaw] else []) ++
(if wxGTK != null then [wxGTK pango cairo pkgconfig] else []);
}

View File

@ -789,13 +789,12 @@ let
};
gnuplot = import ../tools/graphics/gnuplot {
inherit fetchurl stdenv zlib gd texinfo readline;
};
gnuplotX = import ../tools/graphics/gnuplot {
inherit fetchurl stdenv zlib gd texinfo readline;
inherit fetchurl stdenv zlib gd texinfo readline emacs;
inherit (xlibs) libX11 libXt libXaw libXpm;
x11Support = true;
x11Support = getPkgConfig "gnuplot" "x11" false;
wxGTK = if getPkgConfig "gnuplot" "wxGtk" false then wxGTK28 else null;
inherit (gtkLibs) pango;
inherit cairo pkgconfig;
};
gnused = useFromStdenv "gnused"