Install T3 Code desktop launcher

- Generate the .desktop file from a template during install
- Remove the inline desktop item definition
This commit is contained in:
2026-04-25 13:09:49 +03:00
parent a8bcf387ba
commit 87f0014608
2 changed files with 13 additions and 14 deletions
+4 -14
View File
@@ -4,12 +4,10 @@
asar, asar,
stdenv, stdenv,
bun, bun,
copyDesktopItems,
electron_40, electron_40,
gcc, gcc,
git, git,
gnumake, gnumake,
makeDesktopItem,
makeWrapper, makeWrapper,
node-gyp, node-gyp,
nodejs, nodejs,
@@ -76,7 +74,6 @@ in
nativeBuildInputs = [ nativeBuildInputs = [
asar asar
bun bun
copyDesktopItems
gcc gcc
gnumake gnumake
makeWrapper makeWrapper
@@ -87,17 +84,6 @@ in
writableTmpDirAsHomeHook writableTmpDirAsHomeHook
]; ];
desktopItems = [
(makeDesktopItem {
name = "t3code";
desktopName = "T3 Code";
exec = "${placeholder "out"}/bin/t3code %U";
icon = "t3code";
categories = ["Development"];
startupWMClass = "t3code";
})
];
env = { env = {
ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1"; PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
@@ -151,6 +137,10 @@ in
]} \ ]} \
--add-flags "$out/share/${pname}/resources/app.asar" --add-flags "$out/share/${pname}/resources/app.asar"
export out
substituteAll ${./t3code.desktop.in} \
"$out/share/applications/t3code.desktop"
runHook postInstall runHook postInstall
''; '';
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=T3 Code
Exec=@out@/bin/t3code %U
Icon=t3code
Categories=Development;
StartupWMClass=t3code
Terminal=false