13 preferQWebView ? false,
19 pname = "qsyncthingtray";
21 src = fetchFromGitHub {
23 repo = "QSyncthingTray";
25 sha256 = "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w";
31 ] ++ lib.optional preferQWebView qtwebkit;
33 nativeBuildInputs = [ cmake ];
37 ++ lib.optional preferQWebView "-DQST_BUILD_WEBKIT=1"
38 ++ lib.optional preferNative "-DQST_BUILD_NATIVEBROWSER=1";
42 name = "support_native_browser.patch";
43 url = "https://patch-diff.githubusercontent.com/raw/sieren/QSyncthingTray/pull/225.patch";
44 sha256 = "0w665xdlsbjxs977pdpzaclxpswf7xys1q3rxriz181lhk2y66yy";
46 ] ++ lib.optional (!preferQWebView && !preferNative) ./qsyncthingtray-0.5.8-qt-5.6.3.patch;
49 ${lib.optionalString stdenv.hostPlatform.isLinux ''
50 substituteInPlace includes/platforms/linux/posixUtils.hpp \
51 --replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"' \
52 --replace '"pgrep -x' '"${procps}/bin/pgrep -x'
55 ${lib.optionalString stdenv.hostPlatform.isDarwin ''
56 substituteInPlace includes/platforms/darwin/macUtils.hpp \
57 --replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"'
63 qst = "qsyncthingtray";
69 install -m755 QSyncthingTray $out/bin/${qst}
70 ln -s $out/bin/${qst} $out/bin/QSyncthingTray
76 homepage = "https://github.com/sieren/QSyncthingTray/";
77 description = "Traybar Application for Syncthing written in C++";
79 A cross-platform status bar for Syncthing.
80 Currently supports macOS, Windows and Linux.
81 Written in C++ with Qt.
83 license = licenses.lgpl3;
84 maintainers = with maintainers; [
88 platforms = platforms.all;
89 broken = !preferNative || stdenv.hostPlatform.isDarwin;