Hi, Peter Polidoro <pe...@polidoro.io> writes:
> What is the proper way to package plugins when a packaged program > searches for them in the executable path rather than the profile path? > > I would like to package plugins for two programs, kicad and freecad, > and they both search for plugins by first finding the path of the > executable. Freecad uses /proc/self/exe and kicad uses > wxStandardPaths::GetExecutablePath. This seems to cause them to look > for plugins in the package path in the store rather than the profile > path. > > What is the proper way of handling this when packaging plugins? Should > the package of the main program modify the source code to find the > path of the executable using the environment variable GUIX_ENVIRONMENT > rather than /proc/self/exe or wxStandardPaths::GetExecutablePath? Or > can these calls be tricked with hard links somehow? Or is there some > other better way of dealing with this? These programs should be patched to honor e.g. FREECAD_PLUGINS_PATH or similar. Then a 'native-search-path' specification can be attached to the freecad packaged, and finding freecad plugins will happen in any profile. The FREECAD_PLUGINS_PATH should be written with the intent of upstreaming it (sharing it for inclusion with upstream), as that should be valuable to other distributions/scenarios as well. -- Thanks, Maxim