]> Git — Sourcephile - sourcephile-nix.git/blob - .lib/nix/shell.sh
nix: add install scripts
[sourcephile-nix.git] / .lib / nix / shell.sh
1 #!/bin/sh -e
2 use () { true; }
3 watch_file () { true; }
4 log_status () { echo >&2 "$*"; }
5 source_env () {
6 file=$(readlink -e "$1")
7 ( cd "$(dirname "$file")" && . "$file" )
8 }
9 root=$(dirname "$(readlink -e "$0")")/../..
10 . "$root"/.envrc
11 exec nix-shell --pure "$root"/.cache/nix/gcroots/shell.drv "$@"