···1919, kioPluginSupport ? true
2020, plasmoidSupport ? true
2121, systemdSupport ? true
2222+/* It is possible to set via this option an absolute exec path that will be
2323+written to the `~/.config/autostart/syncthingtray.desktop` file generated
2424+during runtime. Alternatively, one can edit the desktop file themselves after
2525+it is generated See:
2626+https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */
2727+, autostartExecPath ? "syncthingtray"
2228}:
23292430mkDerivation rec {
2525- version = "1.3.1";
3131+ version = "1.3.2";
2632 pname = "syncthingtray";
27332834 src = fetchFromGitHub {
2935 owner = "Martchus";
3036 repo = "syncthingtray";
3137 rev = "v${version}";
3232- sha256 = "sha256-0rmfDkPvgubVqfbIOZ+mnv/x1p2sb88zGeg/Q2JCy3I=";
3838+ sha256 = "sha256-zLZw6ltdgO66dvKdLXhr/a6r8UhbSAx06jXrgMARHyw=";
3339 };
3434-3535- patches = [
3636- # Fix Exec= path in runtime-generated
3737- # ~/.config/autostart/syncthingtray.desktop file - this is required because
3838- # we are wrapping the executable. We can't use `substituteAll` because we
3939- # can't use `${placeholder "out"}` because that will produce the $out of
4040- # the patch derivation itself, and not of syncthing's "out" placeholder.
4141- # Hence we use a C definition with NIX_CFLAGS_COMPILE
4242- ./use-nix-path-in-autostart.patch
4343- ];
4444- env.NIX_CFLAGS_COMPILE = "-DEXEC_NIX_PATH=\"${placeholder "out"}/bin/syncthingtray\"";
45404641 buildInputs = [
4742 qtbase
···7065 '';
71667267 cmakeFlags = [
6868+ "-DAUTOSTART_EXEC_PATH=${autostartExecPath}"
7369 # See https://github.com/Martchus/syncthingtray/issues/42
7470 "-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/lib/qt-5"
7571 ] ++ lib.optionals (!plasmoidSupport) ["-DNO_PLASMOID=ON"]