summary refs log tree commit diff
path: root/gnu/packages/syncthing.scm
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2022-01-05 14:09:42 -0500
committerLeo Famulari <leo@famulari.name>2022-01-05 16:10:47 -0500
commitc37559e81979232feee07aa1eb39faacb093c5ca (patch)
treeaa72332e1e0ffd7874eaf7496ac649cc52b9f624 /gnu/packages/syncthing.scm
parentf5da992b16591b6dc358aa5224fa095738471585 (diff)
downloadguix-c37559e81979232feee07aa1eb39faacb093c5ca.tar.gz
gnu: syncthing-gtk: Make the autostart mechanism invoke the correct executable.
Fixes <https://issues.guix.gnu.org/50789>.

* gnu/packages/syncthing.scm (syncthing-gtk)[arguments]: Add a
'fix-autostart-path' phase.
Diffstat (limited to 'gnu/packages/syncthing.scm')
-rw-r--r--gnu/packages/syncthing.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 7125e70117..b05ef88982 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -171,6 +172,14 @@ Protocol.")
                  (substitute* "syncthing_gtk/configuration.py"
                    (("/usr/bin/syncthing") (string-append syncthing
                                                           "/bin/syncthing"))))))
+           (add-after 'unpack 'fix-autostart-path
+             ;; Change the autostart .desktop file 'Exec' command so it finds
+             ;; the Python wrapper of 'syncthing-gtk', rather than the unwrapped
+             ;; '.syncthing-gtk-real'.
+             (lambda _
+               (substitute* "syncthing_gtk/tools.py"
+                 (("return executable")
+                   "return \"syncthing-gtk\""))))
            (add-after 'unpack 'remove-windows.py
              (lambda _
                ;; A Windows-specific module that fails to load with