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:
- Installation status
- p: package, not installed
- i: installed package
- Name@Version
- Title
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.
Install a package. Spec is one of
- Archive file name
- HTTP URL of an archive file name. This URL may contain a star (*)
for the version. In this case pack_install asks for the deirectory
content and selects the latest version.
- GIT URL (not well supported yet)
- A local directory name
- A package name. This queries the package repository at http://www.swi-prolog.org
After resolving the type of package, pack_install/2
is used to do the actual installation.
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. |