summary refs log tree commit diff
path: root/pkgs/tools/graphics/gnuplot
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-12-10 17:11:52 +0000
committerOrivej Desh <orivej@gmx.fr>2017-12-10 19:30:57 +0000
commitbf132e64645d122f8ca7111689d3ea438a918df1 (patch)
tree343ed8670ab26d93838258613d4f05774d81be04 /pkgs/tools/graphics/gnuplot
parent051cbf7cbe7a245449e264893096569af6039698 (diff)
downloadnixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar.gz
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar.bz2
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar.lz
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar.xz
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.tar.zst
nixpkgs-bf132e64645d122f8ca7111689d3ea438a918df1.zip
gnuplot_qt: Qt 4 -> Qt 5
Diffstat (limited to 'pkgs/tools/graphics/gnuplot')
-rw-r--r--pkgs/tools/graphics/gnuplot/default.nix26
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix
index a22d77df81c..8aa14220250 100644
--- a/pkgs/tools/graphics/gnuplot/default.nix
+++ b/pkgs/tools/graphics/gnuplot/default.nix
@@ -12,7 +12,8 @@
 , fontconfig ? null
 , gnused ? null
 , coreutils ? null
-, withQt ? false, qt }:
+, withQt ? false, qttools, qtbase, qtsvg
+}:
 
 assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
 let
@@ -26,21 +27,26 @@ stdenv.mkDerivation rec {
     sha256 = "18diyy7aib9mn098x07g25c7jij1x7wbfpicz0z8gwxx08px45m4";
   };
 
-  nativeBuildInputs = [ makeWrapper pkgconfig texinfo ];
+  nativeBuildInputs = [ makeWrapper pkgconfig texinfo ] ++ lib.optional withQt qttools;
 
   buildInputs =
     [ cairo gd libcerf pango readline zlib ]
     ++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; })
     ++ lib.optional withLua lua
     ++ lib.optionals withX [ libX11 libXpm libXt libXaw ]
-    ++ lib.optional withQt qt
-    # compiling with wxGTK causes a malloc (double free) error on darwin
-    ++ lib.optional (withWxGTK && !stdenv.isDarwin) wxGTK;
-
-  configureFlags =
-    (if withX then ["--with-x"] else ["--without-x"])
-    ++ (if withQt then ["--enable-qt"] else ["--disable-qt"])
-    ++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"]);
+    ++ lib.optionals withQt [ qtbase qtsvg ]
+    ++ lib.optional withWxGTK wxGTK;
+
+  postPatch = ''
+    # lrelease is in qttools, not in qtbase.
+    substituteInPlace configure --replace '$'{QT5LOC}/lrelease lrelease
+  '';
+
+  configureFlags = [
+    (if withX then "--with-x" else "--without-x")
+    (if withQt then "--with-qt=qt5" else "--without-qt")
+    (if aquaterm then "--with-aquaterm" else "--without-aquaterm")
+  ];
 
   postInstall = lib.optionalString withX ''
     wrapProgram $out/bin/gnuplot \