feat(nix/buildLisp): Add 'bundled' function for built-in libraries
Makes it possible to add virtual dependencies on built-in libraries, e.g. `buildLisp.bundled "sb-posix"`.
This commit is contained in:
parent
479510005b
commit
ca60eafa80
1 changed files with 8 additions and 0 deletions
|
@ -161,6 +161,13 @@ let
|
||||||
lispBinary = true;
|
lispBinary = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 'bundled' creates a "library" that calls 'require' on a built-in
|
||||||
|
# package, such as any of SBCL's sb-* packages.
|
||||||
|
bundled = name: (makeOverridable library) {
|
||||||
|
inherit name;
|
||||||
|
srcs = lib.singleton (builtins.toFile "${name}.lisp" "(require '${name})");
|
||||||
|
};
|
||||||
|
|
||||||
# 'sbclWith' creates an image with the specified libraries /
|
# 'sbclWith' creates an image with the specified libraries /
|
||||||
# programs loaded.
|
# programs loaded.
|
||||||
sbclWith = deps:
|
sbclWith = deps:
|
||||||
|
@ -173,4 +180,5 @@ in {
|
||||||
library = makeOverridable library;
|
library = makeOverridable library;
|
||||||
program = makeOverridable program;
|
program = makeOverridable program;
|
||||||
sbclWith = makeOverridable sbclWith;
|
sbclWith = makeOverridable sbclWith;
|
||||||
|
bundled = makeOverridable bundled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue