2.4 The System-Name Index

A collection maps a repository path to a url; the system-name index maps a bare system name (‘alexandria’, ‘hunchentoot’) to a repository designator, so a dependency that ships no ‘.ergo’ file can still be found by name. It is made of ‘ergo:index-system’ forms, in the same three layers as the collection database (built-in, site, user); a higher layer overrides a lower one.

;; ~/.config/ergo/index.d/user.lisp
(ergo:index-system "my-lib" (git "https://example.org/me/my-lib.git"))

ergo index add <name> <designator>’ writes a user entry; ‘ergo index <name>’ shows the matches; ‘ergo search’ consults the index too.

The built-in layer is generated from the quicklisp-projects data (the same catalogue quicklisp uses), so ergo resolves the ~2300 git-hosted quicklisp libraries by name. Installing ‘ergo’ generates a fresh index into its built-in layer (‘make install’ runs the generator; opt out with ‘GENERATE_INDEX=0’, eg. for an offline build).

Quicklisp-projects is updated roughly monthly. Refresh your copy whenever you like — the way you update a quicklisp dist when you choose — by running the installed generator over a fresh checkout, writing to your user layer so it overrides the system one:

$ git clone --depth 1 https://github.com/quicklisp/quicklisp-projects.git
$ sbcl --script "$PREFIX/share/ergo/generate-quicklisp-index.lisp" \
        quicklisp-projects \
        ~/.config/ergo/index.d/quicklisp.lisp \
        ~/.config/ergo/index.d/quicklisp-skipped.txt

Sources quicklisp fetches by other means — tarballs, plain ‘http’ files, ‘svn’, ‘darcs’, ‘mercurial’ — are not git, so ergo cannot fetch them as-is; they are listed in the generator’s skip report, and you can give any of them a git mirror with an ‘ergo:index-system’ entry of your own, which — being in a higher layer — wins over the generated one.