diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix index 18e263dae67..c558b483e97 100644 --- a/pkgs/applications/editors/emacs-24/default.nix +++ b/pkgs/applications/editors/emacs-24/default.nix @@ -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 diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index 23d57f5b652..dc1a476b6e7 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -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' \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 507155fb497..94b16df6ae0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };