···3535 substituteInPlace ./src/Utility/IconManager.vala \
3636 --replace-fail "/usr/share" "$out/share"
37373838+ # Substitute app_command to look for the `timeshift-gtk` in the same directory as the executed `timeshift-launcher`.
3939+ # Substitute the `pkexec ...` as a hack to run a GUI application like Timeshift as root without setting up the corresponding pkexec policy.
3840 substituteInPlace ./src/timeshift-launcher \
3941 --replace-fail "app_command='timeshift-gtk'" ${lib.escapeShellArg ''app_command="$(realpath "$(dirname "$0")")/timeshift-gtk"''} \
4042 --replace-fail ${lib.escapeShellArg ''pkexec ''${app_command}''} ${lib.escapeShellArg ''pkexec env DISPLAY="$DISPLAY" XAUTHORITY="$XAUTHORITY" "''${app_command}"''}