Skip to content

Instantly share code, notes, and snippets.

@expipiplus1
Created July 21, 2021 06:13
Show Gist options
  • Save expipiplus1/bc87359253777b0e223f25134bdc9092 to your computer and use it in GitHub Desktop.
Save expipiplus1/bc87359253777b0e223f25134bdc9092 to your computer and use it in GitHub Desktop.
#!/nix/store/x0dcb2rxlzf32g0ddfkqqz1sfcyx4yay-bash-4.4-p23/bin/bash
dir=${1:-.}
if [ -f package.yaml ]; then
echo package.yaml |
/nix/store/lznm6jcb8kpq7vw28adcagdwfnk6dd7l-entr-4.9/bin/entr -r -- \
sh -c "hpack && cached-nix-shell $dir --keep XDG_DATA_DIRS --run 'hoogle server --local'"
else
echo *.cabal |
/nix/store/lznm6jcb8kpq7vw28adcagdwfnk6dd7l-entr-4.9/bin/entr -r -- \
sh -c "cached-nix-shell $dir --keep XDG_DATA_DIRS --run 'hoogle server --local'"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment