diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-26T23·58+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-01-26T23·58+0000 |
commit | ca60eafa808e2423fd64996b4f678b08ed3277a5 (patch) | |
tree | 4585d4925a0c328ea31911d4e38ce6a3057bc787 /nix | |
parent | 479510005b6f37237a56d4775670deb75de573bd (diff) |
feat(nix/buildLisp): Add 'bundled' function for built-in libraries r/461
Makes it possible to add virtual dependencies on built-in libraries, e.g. `buildLisp.bundled "sb-posix"`.
Diffstat (limited to 'nix')
-rw-r--r-- | nix/buildLisp/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nix/buildLisp/default.nix b/nix/buildLisp/default.nix index 6df1522748c9..58ba492a0120 100644 --- a/nix/buildLisp/default.nix +++ b/nix/buildLisp/default.nix @@ -161,6 +161,13 @@ let 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 / # programs loaded. sbclWith = deps: @@ -173,4 +180,5 @@ in { library = makeOverridable library; program = makeOverridable program; sbclWith = makeOverridable sbclWith; + bundled = makeOverridable bundled; } |