From 386041265a774bdd9f67f347a6cb5a8a94d77a61 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Thu, 25 Jan 2024 14:50:10 +0100 Subject: [PATCH] made icon more dynamic --- flake.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 54a26f2..36e1c62 100644 --- a/flake.nix +++ b/flake.nix @@ -15,21 +15,22 @@ name = "starc"; 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 { exec = name; inherit name; desktopName = "Story Architect"; genericName = "Storywriting Software"; + + icon = name; + comment = "Advanced text editor for script writers."; 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 { packages.${system} = { @@ -42,6 +43,8 @@ }; 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 ''; };