From 67186defdaf4db1d5cc36cb8795b625ef43a6106 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 17 Feb 2019 22:33:32 -0500 Subject: [PATCH] qt5.qtwebkit: refactor version comparison This introduces usingAnnulenWebkitFork variable. Using version check for qtbase.version is misleading because annulen's fork is not tied to a specific qt5 release. --- pkgs/development/libraries/qt-5/modules/qtwebkit.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index 64fb22770ec0..42b95f5d7415 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -20,20 +20,21 @@ let ''; buildInputs = [ perl ]; }; + usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0"; in qtModule { name = "qtwebkit"; qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ] ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia - ++ optional (lib.versionAtLeast qtbase.version "5.11.0") qtwebchannel; + ++ optional usingAnnulenWebkitFork qtwebchannel; buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ] ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ cf-private ICU OpenGL ]) - ++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ hyphen ]; + ++ optional usingAnnulenWebkitFork hyphen; nativeBuildInputs = [ bison2 flex gdb gperf perl pkgconfig python2 ruby - ] ++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ cmake ]; + ] ++ optional usingAnnulenWebkitFork cmake; - cmakeFlags = optionals (lib.versionAtLeast qtbase.version "5.11.0") [ "-DPORT=Qt" ]; + cmakeFlags = optional usingAnnulenWebkitFork "-DPORT=Qt"; # QtWebKit overrides qmake's default_pre and default_post features, # so its custom qmake files must be found first at the front of QMAKEPATH.