A.21 library(prolog_pack): A package manager for Prolog

To be done
- Version logic
- Find and resolve conflicts
- Upgrade git packages
- Validate packages (git: signatures, others: SHA1)
- Build foreign resources
- Test packages: run tests from directory `test'.

The library(prolog_pack) defines a simple package manager for SWI-Prolog. This library lets you inspect installed packages, install packages, remove packages, etc. It is complemented by the built-in attach_packs/0 that makes installed packages available as libaries.

[det]pack_list_installed
List currently installed packages. Unlike pack_list/1, only locally installed packages are displayed and no connection is made to the internet.
See also
Use pack_list/1 to find packages.
pack_info(+Pack)
Print more detailed information about Pack.
[det]pack_search(+Query)
[det]pack_list(+Query)
Query package server and installed packages and display results. Query is matches case-insensitively against the name and title of known and installed packages. For each matching package, a single line is displayed that provides:

Hint: ?- pack_list(''). lists all packages.

The predicates pack_list/1 and pack_search/1 are synonyms. Both contact the package server at http://www.swi-prolog.org to find available packages.

See also
pack_list_installed to list installed packages without contacting the server.
[det]pack_install(+Spec)
Install a package. Spec is one of

After resolving the type of package, pack_install/2 is used to do the actual installation.

[det]pack_install(+Name, +Options)
Install package Name. Options:
url(+URL)
Source for downloading the package
package_directory(+Dir)
Directory into which to install the package
interactive(+Boolean)
[det]pack_rebuild(+Pack)
Rebuilt possible foreign components of Pack.
[det]pack_rebuild
Rebuild foreign components of all packages.
[nondet,multifile]environment(-Name, -Value)
Hook to define the environment for building packs. This Multifile hook extends the process environment for building foreign extensions. A value provided by this hook overrules defaults provided by def_environment/2. In addition to changing the environment, this may be used to pass additional values to the environment, as in:
prolog_pack:environment('USER', User) :-
    getenv('USER', User).
Name is an atom denoting a valid variable name
Value is either an atom or number representing the value of the variable.
[semidet]pack_upgrade(+Pack)
Try to upgrade the package Pack.
To be done
Update dependencies when updating a pack from git?
[det]pack_remove(+Name)
Remove the indicated package.