From 197b168f990680ed941900b3673c841b3f729a26 Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Fri, 8 Dec 2023 20:38:41 -0500 Subject: [PATCH] sparkleshare: Remove fallback to Flatpak image The upstream .desktop file has a fallback to flatpack. It is only intended to run if `sparkleshare` isn't in the user's path. But to make matters even worse it will also run if `sparkleshare` exists with a failure code. Remove this fallback to ensure that users don't download and run unpinned and untrusted code from the internet. --- pkgs/applications/version-management/sparkleshare/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/version-management/sparkleshare/default.nix b/pkgs/applications/version-management/sparkleshare/default.nix index a13f25e68195..ef7da9d880bf 100644 --- a/pkgs/applications/version-management/sparkleshare/default.nix +++ b/pkgs/applications/version-management/sparkleshare/default.nix @@ -49,6 +49,9 @@ stdenv.mkDerivation rec { ]; patchPhase = '' + # SparkleShare's default desktop file falls back to flatpak. + sed -ie "s_^Exec=.*_Exec=$out/bin/sparkleshare_" SparkleShare/Linux/SparkleShare.Autostart.desktop + # Nix will manage the icon cache. echo '#!/bin/sh' >scripts/post-install.sh '';