diff options
Diffstat (limited to 'Biz')
-rwxr-xr-x | Biz/Ide/repl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Biz/Ide/repl b/Biz/Ide/repl index 7c2e15c..dfd8c3d 100755 --- a/Biz/Ide/repl +++ b/Biz/Ide/repl @@ -14,18 +14,24 @@ exts=$(jq --raw-output '.namespace.ext' <<< $json | sort | uniq) case $exts in Hs) - nix-shell \ - --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.ghcWith (h: with h; [$langdeps])" \ - --command "ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci ${targets[@]}" + nix-shell \ + --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.ghcWith (h: with h; [$langdeps])" \ + --command "ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci ${targets[@]}" ;; Scm) - echo "scheme repl not supported yet: $target" - exit 1 + flags=() + for lib in ${langdeps[@]}; do + flags+=(--packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.nixpkgs.guile-${lib}") + done + nix-shell \ + --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.nixpkgs.guile_3_0" \ + ${flags[@]} \ + --command "guile -L $BIZ_ROOT -C $BIZ_ROOT/_/int --r7rs --listen" ;; Lisp) nix-shell \ --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.sbclWith (p: with p; [asdf swank $langdeps])" \ - --run "sbcl --eval '(require :asdf)' --eval '(require :swank)' --eval '(swank:create-server)' --load $targets" + --command "sbcl --eval '(require :asdf)' --eval '(require :swank)' --eval '(swank:create-server)' --load $targets" ;; *) echo "unsupported targets: ${targets[@]}" |