From b5e1e81a3dcf8ef9ad45bfdf3dbf22c03f163ec3 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 8 Jan 2020 19:38:29 +0000 Subject: feat(buildLisp): Add function to wrap SBCL with dependencies Adds `buildLisp.sbclWith` which creates an SBCL wrapper the contains all the requested dependencies. --- nix/buildLisp/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nix/buildLisp') diff --git a/nix/buildLisp/default.nix b/nix/buildLisp/default.nix index 99106315a5..4ce2bbcc01 100644 --- a/nix/buildLisp/default.nix +++ b/nix/buildLisp/default.nix @@ -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; -- cgit 1.4.1