tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Moving files out of PREFIX on macOS



October 1, 2026 at 8:47 AM, ivan%ivanpollak.com@localhost mailto:ivan%ivanpollak.com@localhost  wrote:


> 
> October 1, 2026 at 8:33 AM, "Jonathan Perkin" <jperkin%pkgsrc.org@localhost mailto:jperkin%pkgsrc.org@localhost?to=%22Jonathan%20Perkin%22%20%3Cjperkin%40pkgsrc.org%3E > wrote:
> 
> > 
> > * On 2026-10-01 at 09:24 BST, ivan%ivanpollak.com@localhost wrote:
> >  
> >  
> >  I have implemented both INSTALL and DEINSTALL scripts in a fork:
> >  For .app: https://git.sr.ht/~arcathrax/pkgsrc/tree/main/item/x11/alacritty
> >  For a font: https://git.sr.ht/~arcathrax/pkgsrc/tree/main/item/fonts/nerd-fonts-CodeNewRoman
> >  
> >  I mentioned this on IRC a while back when you first enquired about it, but for the benefit of others..
> >  
> >  I think the way I'd go about handling this would be more along the lines of pkg_alternatives. One of the main issues with putting this in INSTALL and DEINSTALL scripts is that it makes opt-in or opt-out harder for users, as well as being a bit less flexible, as everything is hard-coded directly into the binary packages.
> >  
> >  If we instead had some metadata in the package like we do with +ALTERNATIVES, then we could have an external program that the user can then run to select which applications end up in an Applications directory, configure whether they should go into /Applications or ~/Applications, choose which version should be selected if there are multiple choices, etc.
> > 
> Im not that familiar with pkg_alternatives but I'll look into it! Sorry I was in a hurry when I wrote this on the IRC.
> 
> > 
> > I also said I don't use any .app myself from pkgsrc, so it's not something I'd be interested in working on, but would be happy to review if someone else wanted to take it on.
> > 
> I'd like to start working on it but I cannot guarantee that I'll succeed.
> 
> Best regards,
> Ivan (arcathrax)
>

Okay so I've informed myself a bit and it seems that pkg_alternative is a semi-third-party integration to pkgsrc that just symlinks some applications for better system integration. While I do see that this has an use-case im not sure if that also should be done with the .app's and fonts for macOS. It seems as if it would be the same as just ln -s'ing but with a simpler interface. I do also see that just putting it into /Applications is not a great solution neither because pkgsrc may be chosen to be installed as an user on macOS too. Maybe the best solution is to just write a small daemon that copies over the files from the ${PREFIX}/Applications to an user selected location.

For me personally, the solution is to just put the copy step to the INSTALL/DEINSTALL scripts because I have pkgsrc globally installed.

Best regards,
Ivan (arcathrax)


Home | Main Index | Thread Index | Old Index