diff options
-rw-r--r-- | pkgs/tools/graphics/gnuplot/default.nix | 16 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 7 insertions, 15 deletions
diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index c10777f66ab2..003169415d39 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -10,16 +10,9 @@ , 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.4.0"; src = fetchurl { @@ -27,9 +20,10 @@ stdenv.mkDerivation { sha256 = "0akb2lzxa3b0j4nr6anr0mhsk10b1fcnixk8vk9aa82rl1a2rph0"; }; - configureFlags = if x11Support then ["--with-x"] else ["--without-x"]; + configureFlags = if (libX11 != null) then ["--with-x"] else ["--without-x"]; - buildInputs = [zlib gd texinfo readline emacs lua texLive] ++ - (if x11Support then [libX11 libXt libXpm libXaw] else []) ++ - (if wxGTK != null then [wxGTK pango cairo pkgconfig] else []); + buildInputs = [ + zlib gd texinfo readline emacs lua texLive libX11 libXt libXpm libXaw + wxGTK pango cairo pkgconfig + ]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d6589c12f156..1835c4afb9f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -817,11 +817,9 @@ let openldap bzip2 libusb curl; }; - gnuplot = import ../tools/graphics/gnuplot { - inherit fetchurl stdenv zlib gd texinfo readline emacs; + gnuplot = makeOverridable (import ../tools/graphics/gnuplot) { + inherit fetchurl stdenv zlib gd texinfo readline emacs wxGTK; inherit (xlibs) libX11 libXt libXaw libXpm; - x11Support = getPkgConfig "gnuplot" "x11" false; - wxGTK = if getPkgConfig "gnuplot" "wxGtk" false then wxGTK else null; inherit (gtkLibs) pango; inherit cairo pkgconfig; }; |