use recommended and supported icon sizes

This commit is contained in:
Kristian Krsnik 2024-01-25 16:20:56 +01:00
parent de6c7f7c67
commit c148aa428f
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85

View File

@ -49,9 +49,13 @@
mkdir -p $out/share/
ln -s "${desktopItem}/share/applications" $out/share/applications
# Install icon
mkdir -p $out/share/icons/hicolor/1024x1024/apps
ln -s ${icon} $out/share/icons/hicolor/1024x1024/apps/${name}.png
# Install icons
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
'';
};
};