···1919 };
2020 idrisLibraries = [ ];
2121};
2222-in lspLibPkg.library
2222+in lspLibPkg.library { withSource = true; }
2323```
24242525The above results in a derivation with the installed library results (with sourcecode).
···30303131# Assuming the previous example lives in `lsp-lib.nix`:
3232let lspLib = callPackage ./lsp-lib.nix { };
3333+ inherit (idris2Packages) idris2Api;
3334 lspPkg = idris2Packages.buildIdris {
3435 ipkgName = "idris2-lsp";
3536 src = fetchFromGitHub {
···3839 rev = "main";
3940 hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk=";
4041 };
4141- idrisLibraries = [(idris2Packages.idris2Api { }) (lspLib { })];
4242+ idrisLibraries = [idris2Api lspLib];
4243 };
4344in lspPkg.executable
4445```
45464646-The above uses the default value of `withSource = false` for both of the two required Idris libraries that the `idris2-lsp` executable depends on. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler.
4747-4747+The above uses the default value of `withSource = false` for the `idris2Api` but could be modified to include that library's source by passing `(idris2Api { withSource = true; })` to `idrisLibraries` instead. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler.