added multiple icons

This commit is contained in:
Kristian Krsnik 2024-01-25 15:17:30 +01:00
parent 33b97f2500
commit b2f8e566b7
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85

View File

@ -31,6 +31,8 @@
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}"];
}; };
in { in {
packages.${system} = { packages.${system} = {
@ -43,10 +45,16 @@
}; };
extraInstallCommands = '' extraInstallCommands = ''
mkdir -p $out/share/icons/hicolor/1024x1024/apps/ mkdir -p $out/share/icons/
ln -s "${desktopItem}/share/applications" $out/share/applications ln -s "${desktopItem}/share/applications" $out/share/applications
ln -s "${icon}" $out/share/icons/hicolor/1024x1024/apps/${name}.png
for dimension in 128 256 512; do
dimensions=''${dimension}x''${dimension}
mkdir -p $out/share/icons/hicolor/$dimensions/apps
"${pkgs.imagemagick}/bin/convert" ${icon} -resize $dimensions $out/share/icons/hicolor/$dimensions/apps/${name}.png
done
''; '';
}; };
}; };