gnuplot darwin: optional gnuplot_aquaterm variant

This variant uses the more Mac-friendly aqua driver, but it requires
that you separately install the AquaTerm package.

Note that AquaTerm is open source and could perhaps be later included
as a nix derivation. If that happens, it would be nice to remove the
gnuplot_aquaterm top-level attribute and just make it the default.
This commit is contained in:
Eric Kow 2013-11-10 13:43:43 +00:00
parent 9a97b842c5
commit 9f7510113e
2 changed files with 10 additions and 3 deletions

View file

@ -6,6 +6,7 @@
, libXt ? null
, libXpm ? null
, libXaw ? null
, aquaterm ? false
, wxGTK ? null
, pango ? null
, cairo ? null
@ -24,15 +25,18 @@ stdenv.mkDerivation rec {
sha256 = "1xd7gqdhlk7k1p9yyqf9vkk811nadc7m4si0q3nb6cpv4pxglpyz";
};
withX = libX11 != null && !aquaterm;
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"];
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

@ -1003,6 +1003,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 { };