feat(buildLisp): Add function to wrap SBCL with dependencies

Adds `buildLisp.sbclWith` which creates an SBCL wrapper the contains
all the requested dependencies.
This commit is contained in:
Vincent Ambo 2020-01-08 19:38:29 +00:00
parent ca199a57d9
commit b5e1e81a3d

View file

@ -9,7 +9,7 @@
let
inherit (builtins) map elemAt match;
inherit (pkgs.third_party) lib runCommandNoCC writeText sbcl;
inherit (pkgs.third_party) lib runCommandNoCC writeText writeShellScriptBin sbcl;
#
# Internal helper definitions
@ -83,7 +83,9 @@ let
# 'sbclWith' creates an image with the specified libraries /
# programs loaded.
sbclWith = {};
sbclWith = deps: writeShellScriptBin "sbcl" ''
exec ${sbcl}/bin/sbcl ${insertLibraryLoads deps} $@
'';
in {
library = makeOverridable library;
program = makeOverridable program;