summary refs log tree commit diff
path: root/pkgs/applications/misc/qsyncthingtray
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-12-20 09:41:52 +0800
committerPeter Hoeg <peter@hoeg.com>2017-12-29 11:53:47 +0800
commit6d9dfdc86d1dda3132482a155c5eaa18e87efa2d (patch)
tree488df8ef99f4bdcdc16e300ef53a1399c196147a /pkgs/applications/misc/qsyncthingtray
parentade98dc442ea78e9783d5e26954e64ec4a1b2c94 (diff)
downloadnixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar.gz
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar.bz2
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar.lz
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar.xz
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.tar.zst
nixlib-6d9dfdc86d1dda3132482a155c5eaa18e87efa2d.zip
qsyncthingtray: build with native browser to allow for Qt > 5.6
Diffstat (limited to 'pkgs/applications/misc/qsyncthingtray')
-rw-r--r--pkgs/applications/misc/qsyncthingtray/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/applications/misc/qsyncthingtray/default.nix b/pkgs/applications/misc/qsyncthingtray/default.nix
index bc909742c6df..763435da564d 100644
--- a/pkgs/applications/misc/qsyncthingtray/default.nix
+++ b/pkgs/applications/misc/qsyncthingtray/default.nix
@@ -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);
   };
 }