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:
@@ -4,12 +4,10 @@
|
||||
asar,
|
||||
stdenv,
|
||||
bun,
|
||||
copyDesktopItems,
|
||||
electron_40,
|
||||
gcc,
|
||||
git,
|
||||
gnumake,
|
||||
makeDesktopItem,
|
||||
makeWrapper,
|
||||
node-gyp,
|
||||
nodejs,
|
||||
@@ -76,7 +74,6 @@ in
|
||||
nativeBuildInputs = [
|
||||
asar
|
||||
bun
|
||||
copyDesktopItems
|
||||
gcc
|
||||
gnumake
|
||||
makeWrapper
|
||||
@@ -87,17 +84,6 @@ in
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "t3code";
|
||||
desktopName = "T3 Code";
|
||||
exec = "${placeholder "out"}/bin/t3code %U";
|
||||
icon = "t3code";
|
||||
categories = ["Development"];
|
||||
startupWMClass = "t3code";
|
||||
})
|
||||
];
|
||||
|
||||
env = {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
||||
@@ -151,6 +137,10 @@ in
|
||||
]} \
|
||||
--add-flags "$out/share/${pname}/resources/app.asar"
|
||||
|
||||
export out
|
||||
substituteAll ${./t3code.desktop.in} \
|
||||
"$out/share/applications/t3code.desktop"
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user