# lisp-modules {#lisp} This document describes the Nixpkgs infrastructure for building Common Lisp <del> libraries that use ASDF (Another System Definition Facility). It lives in `pkgs/development/lisp-modules`. </del> <ins> systems that use [ASDF](https://asdf.common-lisp.dev/) (Another System Definition Facility). It lives in `pkgs/development/lisp-modules`. </ins> ## Overview {#lisp-overview} The main entry point of the API are the Common Lisp implementation packages <del> (e.g. `abcl`, `ccl`, `clasp-common-lisp`, `clisp` `ecl`, `sbcl`) themselves. They have the `pkgs` and `withPackages` attributes, which can be used to discover available packages and to build wrappers, respectively. The `pkgs` attribute set contains packages that were automatically imported from Quicklisp, and any other manually defined ones. Not every package works for all the CL implementations (e.g. `nyxt` only makes sense for `sbcl`). The `withPackages` function is of primary utility. It is used to build runnable wrappers, with a pinned and pre-built ASDF FASL available in the `ASDF` environment variable, and `CL_SOURCE_REGISTRY`/`ASDF_OUTPUT_TRANSLATIONS` configured to find the desired systems on runtime. With a few exceptions, the primary thing that the infrastructure does is to run `asdf:load-system` for each system specified in the `systems` argument to `build-asdf-system`, and save the FASLs to the Nix store. Then, it makes these FASLs available to wrappers. Any other use-cases, such as producing SBCL executables with `sb-ext:save-lisp-and-die`, are achieved via overriding the `buildPhase` etc. </del> <ins> themselves (e.g. `abcl`, `ccl`, `clasp-common-lisp`, `clisp`, `ecl`, `sbcl`). They have the `pkgs` and `withPackages` attributes, which can be used to discover available packages and to build wrappers, respectively. The `pkgs` attribute set contains packages that were automatically [imported](#lisp-importing-packages-from-quicklisp) from Quicklisp, and any other [manually defined](#lisp-defining-packages-inside) ones. Not every package works for all the CL implementations (e.g. `nyxt` only makes sense for `sbcl`). The `withPackages` function is of primary utility. It is used to build [runnable wrappers](#lisp-building-wrappers), with a pinned and pre-built [ASDF FASL](#lisp-loading-asdf) available in the `ASDF` environment variable, and `CL_SOURCE_REGISTRY`/`ASDF_OUTPUT_TRANSLATIONS` configured to [find the desired systems on runtime](#lisp-loading-systems). </ins> In addition, Lisps have the `withOverrides` function, which can be used to <del> substitute any package in the scope of their `pkgs`. This will be useful together with `overrideLispAttrs` when dealing with slashy ASDF systems, because they should stay in the main package and be build by specifying the `systems` </del> <ins> [substitute](#lisp-including-external-pkg-in-scope) any package in the scope of their `pkgs`. This will also be useful together with `overrideLispAttrs` when [dealing with slashy systems](#lisp-dealing-with-slashy-systems), because they should stay in the main package and be built by specifying the `systems` </ins> argument to `build-asdf-system`. ## The 90% use case example {#lisp-use-case-example}