made icon more dynamic

This commit is contained in:
Kristian Krsnik 2024-01-25 14:50:10 +01:00
parent 18ef8800fc
commit 386041265a
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85

View File

@ -15,21 +15,22 @@
name = "starc"; name = "starc";
version = "0.6.4"; version = "0.6.4";
icon = pkgs.fetchurl {
url = "https://github.com/story-apps/starc/blob/v${version}/img/starc.png";
sha256 = "sha256-wixqb1cV+WEhgxsl2CeOjrid4P0daHqh0O40h2iPst4=";
};
desktopItem = pkgs.makeDesktopItem { desktopItem = pkgs.makeDesktopItem {
exec = name; exec = name;
inherit name; inherit name;
desktopName = "Story Architect"; desktopName = "Story Architect";
genericName = "Storywriting Software"; genericName = "Storywriting Software";
icon = name;
comment = "Advanced text editor for script writers."; comment = "Advanced text editor for script writers.";
categories = ["Office" "TextEditor" "Utility"]; categories = ["Office" "TextEditor" "Utility"];
mimeTypes = ["application/x-${name}"];
icon = pkgs.fetchurl {
url = "https://github.com/story-apps/starc/blob/v${version}/img/starc.png";
sha256 = "sha256-wixqb1cV+WEhgxsl2CeOjrid4P0daHqh0O40h2iPst4=";
};
}; };
in { in {
packages.${system} = { packages.${system} = {
@ -42,6 +43,8 @@
}; };
extraInstallCommands = '' extraInstallCommands = ''
mkdir -p $out/share/icons/hicolor/1024x1024/apps/
ln -s "${icon}" $out/share/icons/hicolor/1024x1024/apps/${name}.png
ln -s "${desktopItem}/share" $out/share ln -s "${desktopItem}/share" $out/share
''; '';
}; };