localsend: remove absolute path in desktop entry (#348584)

This commit is contained in:
Aleksana 2024-10-17 11:48:50 +08:00 committed by GitHub
commit 3a5940b539
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@
fetchFromGitHub,
flutter324,
makeDesktopItem,
copyDesktopItems,
nixosTests,
pkg-config,
libayatana-appindicator,
@ -35,7 +36,10 @@ let
"permission_handler_windows" = "sha256-+TP3neqlQRZnW6BxHaXr2EbmdITIx1Yo7AEn5iwAhwM=";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
pkg-config
copyDesktopItems
];
buildInputs = [ libayatana-appindicator ];
@ -50,20 +54,19 @@ let
mkdir -p $d
ln -s $out/app/data/flutter_assets/assets/img/logo-''${s}.png $d/localsend.png
done
mkdir -p $out/share/applications
cp $desktopItem/share/applications/*.desktop $out/share/applications
substituteInPlace $out/share/applications/*.desktop --subst-var out
'';
desktopItem = makeDesktopItem {
name = "LocalSend";
exec = "@out@/bin/localsend_app";
icon = "localsend";
desktopName = "LocalSend";
startupWMClass = "localsend_app";
genericName = "An open source cross-platform alternative to AirDrop";
categories = [ "Network" ];
};
desktopItems = [
(makeDesktopItem {
name = "LocalSend";
exec = "localsend_app";
icon = "localsend";
desktopName = "LocalSend";
startupWMClass = "localsend_app";
genericName = "An open source cross-platform alternative to AirDrop";
categories = [ "Network" ];
})
];
passthru = {
updateScript = ./update.sh;