Merge pull request #209062 from doronbehar/pkg/syncthingtray

syncthingtray: 1.3.1 -> 1.3.2

authored by

Doron Behar and committed by
GitHub
2eeefe41 f6f9829f

+9 -26
+9 -13
pkgs/applications/misc/syncthingtray/default.nix
··· 19 19 , kioPluginSupport ? true 20 20 , plasmoidSupport ? true 21 21 , systemdSupport ? true 22 + /* It is possible to set via this option an absolute exec path that will be 23 + written to the `~/.config/autostart/syncthingtray.desktop` file generated 24 + during runtime. Alternatively, one can edit the desktop file themselves after 25 + it is generated See: 26 + https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */ 27 + , autostartExecPath ? "syncthingtray" 22 28 }: 23 29 24 30 mkDerivation rec { 25 - version = "1.3.1"; 31 + version = "1.3.2"; 26 32 pname = "syncthingtray"; 27 33 28 34 src = fetchFromGitHub { 29 35 owner = "Martchus"; 30 36 repo = "syncthingtray"; 31 37 rev = "v${version}"; 32 - sha256 = "sha256-0rmfDkPvgubVqfbIOZ+mnv/x1p2sb88zGeg/Q2JCy3I="; 38 + sha256 = "sha256-zLZw6ltdgO66dvKdLXhr/a6r8UhbSAx06jXrgMARHyw="; 33 39 }; 34 - 35 - patches = [ 36 - # Fix Exec= path in runtime-generated 37 - # ~/.config/autostart/syncthingtray.desktop file - this is required because 38 - # we are wrapping the executable. We can't use `substituteAll` because we 39 - # can't use `${placeholder "out"}` because that will produce the $out of 40 - # the patch derivation itself, and not of syncthing's "out" placeholder. 41 - # Hence we use a C definition with NIX_CFLAGS_COMPILE 42 - ./use-nix-path-in-autostart.patch 43 - ]; 44 - env.NIX_CFLAGS_COMPILE = "-DEXEC_NIX_PATH=\"${placeholder "out"}/bin/syncthingtray\""; 45 40 46 41 buildInputs = [ 47 42 qtbase ··· 70 65 ''; 71 66 72 67 cmakeFlags = [ 68 + "-DAUTOSTART_EXEC_PATH=${autostartExecPath}" 73 69 # See https://github.com/Martchus/syncthingtray/issues/42 74 70 "-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/lib/qt-5" 75 71 ] ++ lib.optionals (!plasmoidSupport) ["-DNO_PLASMOID=ON"]
-13
pkgs/applications/misc/syncthingtray/use-nix-path-in-autostart.patch
··· 1 - diff --git i/widgets/settings/settingsdialog.cpp w/widgets/settings/settingsdialog.cpp 2 - index 4deff1f..16845b5 100644 3 - --- i/widgets/settings/settingsdialog.cpp 4 - +++ w/widgets/settings/settingsdialog.cpp 5 - @@ -802,7 +802,7 @@ bool setAutostartEnabled(bool enabled) 6 - desktopFile.write("[Desktop Entry]\n" 7 - "Name=" APP_NAME "\n" 8 - "Exec=\""); 9 - - desktopFile.write(qEnvironmentVariable("APPIMAGE", QCoreApplication::applicationFilePath()).toUtf8().data()); 10 - + desktopFile.write(qEnvironmentVariable("APPIMAGE", EXEC_NIX_PATH).toUtf8().data()); 11 - desktopFile.write("\" qt-widgets-gui --single-instance\nComment=" APP_DESCRIPTION "\n" 12 - "Icon=" PROJECT_NAME "\n" 13 - "Type=Application\n"