diff options
author | Peter Simons <simons@cryp.to> | 2010-05-19 12:25:51 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-05-19 12:25:51 +0000 |
commit | aa600ed8f78e2fad8f9504b0fa9a5ea72b019448 (patch) | |
tree | aaec91449f1f89ccaf3d821aba6fe024701d32e2 | |
parent | d9c1f1b1183fb0c9785484f0554f562d0030e386 (diff) | |
download | nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar.gz nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar.bz2 nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar.lz nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar.xz nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.tar.zst nixlib-aa600ed8f78e2fad8f9504b0fa9a5ea72b019448.zip |
pkgs/top-level/all-packages.nix: prefer makeOverridable over getPkgConfig to customize GNU plot
Changed 'gnuplot' expression to allow for argument overriding instead of relying on getPkgConfig. While I was at it, I also simplified the actual build expression a bit. svn path=/nixpkgs/trunk/; revision=21864
-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; }; |