diff options
author | Ben Sima <ben@bsima.me> | 2023-08-03 22:39:27 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-08-03 22:41:16 -0400 |
commit | b8cdef27e76d37f8857e0f93e427eb9119ffb153 (patch) | |
tree | 87b52b5335d8481d147eee9fd388f8824e7ebd78 /Biz/Ide/repl | |
parent | 88af507c33ab32ae23e35bde9cd7fbbc0d534390 (diff) |
Add packageSet argument
Diffstat (limited to 'Biz/Ide/repl')
-rwxr-xr-x | Biz/Ide/repl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Biz/Ide/repl b/Biz/Ide/repl index 3ed9fa1..0d0a08d 100755 --- a/Biz/Ide/repl +++ b/Biz/Ide/repl @@ -29,6 +29,7 @@ fi langdeps=$(jq --raw-output '.[].langdeps | join(" ")' <<< $json) sysdeps=$(jq --raw-output '.[].sysdeps | join(" ")' <<< $json) exts=$(jq --raw-output '.[].namespace.ext' <<< $json | sort | uniq) + packageSet=$(jp --raw-output '.[].packageSet' <<< $json) BILD="(import ${BIZ_ROOT:?}/Biz/Bild.nix {})" for lib in ${sysdeps[@]}; do flags+=(--packages "$BILD.private.nixpkgs.${lib}") @@ -43,7 +44,7 @@ fi if [ -z ${var+PORT} ]; then echo "warn: repl: ghci does not support binding to a port" fi - flags+=(--packages "$BILD.private.ghcWith (h: with h; [$langdeps])") + flags+=(--packages "$BILD.private.$packageSet (h: with h; [$langdeps])") command=${CMD:-"ghci -i${BIZ_ROOT:?} -ghci-script ${BIZ_ROOT:?}/.ghci ${targets[@]}"} ;; Scm) @@ -54,7 +55,7 @@ fi command=${CMD:-"guile -L ${BIZ_ROOT:?} -C ${BIZ_ROOT:?}/_/int --r7rs --listen=${PORT:-37146}"} ;; Lisp) - flags+=(--packages "$BILD.private.sbclWith (p: with p; [asdf swank $langdeps])") + flags+=(--packages "$BILD.private.$packageSet (p: with p; [asdf swank $langdeps])") command=${CMD:-"sbcl --eval '(require :asdf)' --eval '(require :swank)' --eval '(swank:create-server :port ${PORT:-4005})' --load $targets"} ;; Rs) |