Merge pull request #33128 from peterhoeg/u/qst

qsyncthingtray: build with native browser to allow for Qt > 5.6
This commit is contained in:
Frederik Rietdijk 2018-02-11 08:38:47 +00:00 committed by GitHub
commit d8b8c6be9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 7 deletions

View file

@ -1,8 +1,9 @@
{ mkDerivation, stdenv, lib, fetchFromGitHub, procps ? null
{ mkDerivation, stdenv, lib, fetchFromGitHub, fetchpatch, procps ? null
, qtbase, qtwebengine, qtwebkit
, cmake
, syncthing, syncthing-inotify ? null
, preferQWebView ? false }:
, preferQWebView ? false
, preferNative ? true }:
mkDerivation rec {
version = "0.5.8";
@ -16,11 +17,18 @@ mkDerivation rec {
};
buildInputs = [ qtbase qtwebengine ] ++ lib.optional preferQWebView qtwebkit;
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optional preferQWebView "-DQST_BUILD_WEBKIT=1";
cmakeFlags = [ ]
++ lib.optional preferQWebView "-DQST_BUILD_WEBKIT=1"
++ lib.optional preferNative "-DQST_BUILD_NATIVEBROWSER=1";
patches = [ ./qsyncthingtray-0.5.8-qt-5.6.3.patch ];
patches = [ (fetchpatch {
name = "support_native_browser.patch";
url = "https://patch-diff.githubusercontent.com/raw/sieren/QSyncthingTray/pull/225.patch";
sha256 = "0w665xdlsbjxs977pdpzaclxpswf7xys1q3rxriz181lhk2y66yy";
}) ] ++ lib.optional (!preferQWebView && !preferNative) ./qsyncthingtray-0.5.8-qt-5.6.3.patch;
postPatch = ''
${lib.optionalString stdenv.isLinux ''
@ -60,6 +68,8 @@ mkDerivation rec {
maintainers = with maintainers; [ zraexy peterhoeg ];
platforms = platforms.all;
# 0.5.7 segfaults when opening the main panel with qt 5.7 and fails to compile with qt 5.8
broken = builtins.compareVersions qtbase.version "5.7.0" >= 0;
# but qt > 5.6 works when only using the native browser
# https://github.com/sieren/QSyncthingTray/issues/223
broken = (builtins.compareVersions qtbase.version "5.7.0" >= 0 && !preferNative);
};
}

View file

@ -16857,8 +16857,7 @@ with pkgs;
qt = qt4;
};
# 0.5.7 segfaults when opening the main panel with qt 5.7 and fails to compile with qt 5.8
qsyncthingtray = libsForQt56.callPackage ../applications/misc/qsyncthingtray { };
qsyncthingtray = libsForQt5.callPackage ../applications/misc/qsyncthingtray { };
qstopmotion = callPackage ../applications/video/qstopmotion { };