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 , fontconfig ? null
, gnused ? null , gnused ? null
, coreutils ? null , coreutils ? null
, withQt ? false, qt }: , withQt ? false, qttools, qtbase, qtsvg
}:
assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null); assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
let let
@ -26,21 +27,26 @@ stdenv.mkDerivation rec {
sha256 = "18diyy7aib9mn098x07g25c7jij1x7wbfpicz0z8gwxx08px45m4"; sha256 = "18diyy7aib9mn098x07g25c7jij1x7wbfpicz0z8gwxx08px45m4";
}; };
nativeBuildInputs = [ makeWrapper pkgconfig texinfo ]; nativeBuildInputs = [ makeWrapper pkgconfig texinfo ] ++ lib.optional withQt qttools;
buildInputs = buildInputs =
[ cairo gd libcerf pango readline zlib ] [ cairo gd libcerf pango readline zlib ]
++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; }) ++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; })
++ lib.optional withLua lua ++ lib.optional withLua lua
++ lib.optionals withX [ libX11 libXpm libXt libXaw ] ++ lib.optionals withX [ libX11 libXpm libXt libXaw ]
++ lib.optional withQt qt ++ lib.optionals withQt [ qtbase qtsvg ]
# compiling with wxGTK causes a malloc (double free) error on darwin ++ lib.optional withWxGTK wxGTK;
++ lib.optional (withWxGTK && !stdenv.isDarwin) wxGTK;
configureFlags = postPatch = ''
(if withX then ["--with-x"] else ["--without-x"]) # lrelease is in qttools, not in qtbase.
++ (if withQt then ["--enable-qt"] else ["--disable-qt"]) substituteInPlace configure --replace '$'{QT5LOC}/lrelease lrelease
++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"]); '';
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 '' postInstall = lib.optionalString withX ''
wrapProgram $out/bin/gnuplot \ wrapProgram $out/bin/gnuplot \

View File

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