aboutsummaryrefslogtreecommitdiff
path: root/pkgs/dev/dev.sh
blob: 23b1fae71b80df784075aa58e3b11c4024074beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
set -eu

target="$1"
shift

known_shells="$(tr ':' '\n' <<<"${DEV_SHELLS:-}")"
while IFS='=' read name drv res; do
	if [ "$target" == "$name" ]; then
		target="$drv#$name"
		break
	fi
done <<<"$known_shells"

exec nix develop "$target" -c zsh "$@"