aboutsummaryrefslogtreecommitdiff
path: root/pkgs/dev/dev.sh
blob: f88224a27416db55059454a8f46d3059547fffdc (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 val; do
	if [ "$target" == "$name" ]; then
		target="$DEV_FLAKE#$name"
		break
	fi
done <<<"$known_shells"

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