NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.26k forks source link

desktopToDarwinBundle: 16x and 32x app icons are broken #358210

Open carlossless opened 19 hours ago

carlossless commented 19 hours ago

Describe the bug

I noticed that some app bundles that are created through desktopToDarwinBundle have icons that appear corrupted when viewed in Finder. This seems to only apply to 16x16 and 32x32 icon sizes.

16x16 32x32 64x64
image image image

The affected apps in the screenshot are dsview, ghidra and pulseview (that version of q2pro is WIP and not present in nixpkgs yet, but it also suffers from the same problem).

App bundles created through different means don't seem to have this issue (example: openboardview, kitty, 1password, vscode)

Steps To Reproduce

  1. Install pulseview (systemPackages or through home-manager)
  2. Open nix application bundle directory in Finder
  3. Set view icon size to 16x16 or 32x32

Expected behavior

App icons should show up in Finder correctly

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.1.0, macOS 15.1.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.8`
 - channels(carlossless): `"darwin, home-manager"`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Notify maintainers


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

carlossless commented 19 hours ago

The issue happens because PNG is used for the icp4 and icp5 icons.

https://en.wikipedia.org/wiki/Apple_Icon_Image_format#Icon_types image