summaryrefslogtreecommitdiff
path: root/nix/shellHook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nix/shellHook.sh')
-rw-r--r--nix/shellHook.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/nix/shellHook.sh b/nix/shellHook.sh
index 035c450..981f86e 100644
--- a/nix/shellHook.sh
+++ b/nix/shellHook.sh
@@ -20,20 +20,27 @@ function deps() {
niv --sources-file $BIZ_ROOT/nix/sources.json $@
}
-function ghci() {
- ghci -i$BIZ_ROOT -ghci-script "$BIZ_ROOT/.ghci"
-}
+alias ghci="ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci"
function hero() {
- out="_bild/nix"
export HERO_PORT=3000
- export HERO_NODE=$BIZ_ROOT/$out/Hero.Node/static
export HERO_KEEP=$BIZ_ROOT/_keep
export HERO_SKEY=$BIZ_ROOT/_skey
- b="runghc Biz.Bild"
- rg --files \
- | entr -rcs \
- "$b Hero.Host && $b Hero.Node && $out/Hero.Host/bin/mmc"
+ bild="runghc Biz.Bild"
+ if [[ -z "${IN_NIX_SHELL}" ]]
+ then
+ out="_bild/dev"
+ export HERO_NODE=$BIZ_ROOT/$out/static/mmc.js/all.js
+ rg --files \
+ | entr -rcs \
+ "$bild Hero.Host && $bild Hero.Node && $out/bin/mmc"
+ else
+ out="_bild/nix"
+ export HERO_NODE=$BIZ_ROOT/$out/Hero.Node/static
+ rg --files \
+ | entr -rcs \
+ "$bild Hero.Host && $bild Hero.Node && $out/Hero.Host/bin/mmc"
+ fi
}
function lint() {