merge #1197: gnuplot darwin changes

This commit is contained in:
Vladimír Čunát 2013-12-10 12:46:45 +01:00
commit c11747b3f5
3 changed files with 15 additions and 5 deletions

View File

@ -2,7 +2,7 @@
, pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
, alsaLib, cairo
, withX ? true
, withX ? !stdenv.isDarwin
}:
assert (libXft != null) -> libpng != null; # probably a bug

View File

@ -6,6 +6,7 @@
, libXt ? null
, libXpm ? null
, libXaw ? null
, aquaterm ? false
, wxGTK ? null
, pango ? null
, cairo ? null
@ -15,7 +16,9 @@
, coreutils ? null }:
assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
let
withX = libX11 != null && !aquaterm;
in
stdenv.mkDerivation rec {
name = "gnuplot-4.6.3";
@ -25,14 +28,18 @@ stdenv.mkDerivation rec {
};
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"])
++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"])
;
postInstall = stdenv.lib.optionalString (libX11 != null) ''
postInstall = stdenv.lib.optionalString withX ''
wrapProgram $out/bin/gnuplot \
--prefix PATH : '${gnused}/bin' \
--prefix PATH : '${coreutils}/bin' \

View File

@ -1011,6 +1011,9 @@ let
else stdenv;
};
# must have AquaTerm installed separately
gnuplot_aquaterm = gnuplot.override { aquaterm = true; };
gnused = callPackage ../tools/text/gnused { };
gnutar = callPackage ../tools/archivers/gnutar { };