skeditor: add desktopitem, mainProgram (#352836)

Co-authored-by: Masum Reza <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
Eveeifyeve 2024-11-08 20:19:42 +11:00 committed by GitHub
parent 4f95a34351
commit efab9a3e06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,9 @@
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
makeDesktopItem,
copyDesktopItems,
iconConvTools,
}:
buildDotnetModule rec {
pname = "skeditor";
@ -22,6 +25,36 @@ buildDotnetModule rec {
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
nativeBuildInputs = [
iconConvTools
copyDesktopItems
];
postInstall = ''
icoFileToHiColorTheme SkEditor/Assets/SkEditor.ico skeditor $out
'';
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "SkEditor";
exec = meta.mainProgram;
icon = "SkEditor";
startupWMClass = "SkEditor";
genericName = "Skript Editor";
keywords = [
"skeditor"
"SkEditor"
];
categories = [
"Utility"
"TextEditor"
"Development"
"IDE"
];
})
];
passthru.updateScript = ./update.sh;
meta = {
@ -29,6 +62,7 @@ buildDotnetModule rec {
homepage = "https://github.com/SkEditorTeam/SkEditor";
changelog = "https://github.com/SkEditorTeam/SkEditor/releases/tag/v${version}";
license = lib.licenses.mit;
mainProgram = "SkEditor";
maintainers = with lib.maintainers; [ eveeifyeve ];
};
}