Installing packs privately

I have a question on how packs work in SWI that I can’t answer just with the docs:
recently I created a repo for a prolog library, on github, and I called pack_install(url). That library is now also available in the SWI addons page https://www.swi-prolog.org/pack/list

I’d like to structure my own helper prolog files as packs, but keep them local. How do I accomplish that? How does the indexing in the SWI addon page work?

If you look at e.g., the SWISH sources, you’ll see it attaches packs as git submodules. You then use attach_packs/2 to use the packs from your locally installed directory. I think that is generally a better way to deal with packs than installing them for the current user or system-wide as it simplifies version management and redistribution.

The SWISH Makefile can be used to download and where needed compile the foreign components of the packs.

1 Like