Formula that wants to modify another prefix fails

Hi

I am trying to write a formula that installs Tix an extended set of widget for Tk. However, Tix during make install wants to modify /usr/local/Cellar/tcl-tk/8.6.9 (it wants to create /usr/local/Cellar/tcl-tk/8.6.9/lib/Tix8.4.3 and write things there) during make install and I get

mkdir: /usr/local/Cellar/tcl-tk/8.6.9/lib/Tix8.4.3: Operation not permitted

however outside a running homebrew process the same operation is quite possible

now I can see that there might be a problem with one formula modifying anothers prefix but I can’t see how I get round it for this library…

any suggestions gratefully received!

regards
Gary

Afaik you can’t and shouldn’t. You’re better off vendoring the install you need to modify.

Sorry I don’t under what vendoring an install means. Does it really mean I need to adapt the tcl tk installation to include tix as well ie create a fork/derivative?

Vendoring dependencies is basically making a copy of them within your own install. In this case it would mean that your formula would build tcl-tk in a directory for the install and build and install Tix using that version rather than the official tcl-tk formula.