I spent two days on this, because I did not want to:
- Copy the apps
- Use trampolines.
- Aliases (because they do not show up as applications).
- Wrapper scripts (because I got weird rosetta prompts).
The issues seems to be the symlinks.
What worked for me was a hybrid approach. I copy the Info.plist and the icon and symlink the rest.
Claude.ai was friendly enough to give me some code for this that worked (modulo some manual fixes).
This didn't work for me initially, I'm not sure why, but I found that I was able to fix it by pointing to the correct home-manager path for my system, rather than the system nix profile path in this example. Thank you @Jabb0 for this fix, been trying to resolve this for a while now and yours is the first solution that's allowed it to work with spotlight for me.
Here's the changes I made
this bit is just naming as I believe home manager is creating a symlink that points to the source in nix store and that's what I'm looping through here
Here is my full macos-app-fix.nix file