gnuplot_qt: Qt 4 -> Qt 5

This commit is contained in:
Orivej Desh 2017-12-10 17:11:52 +00:00
parent 051cbf7cbe
commit bf132e6464
2 changed files with 16 additions and 10 deletions

View File

@ -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;
++ lib.optionals withQt [ qtbase qtsvg ]
++ lib.optional withWxGTK 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"]);
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 \

View File

@ -2342,7 +2342,7 @@ with pkgs;
};
gnupg = gnupg22;
gnuplot = callPackage ../tools/graphics/gnuplot { qt = qt4; };
gnuplot = libsForQt5.callPackage ../tools/graphics/gnuplot { };
gnuplot_qt = gnuplot.override { withQt = true; };