From fbc988088c25ab6a81e786a9554cb03e8ead4958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 15 Nov 2022 15:07:34 +0100 Subject: pkgs/dev: allow running without argument --- pkgs/dev/dev.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkgs/dev/dev.sh') diff --git a/pkgs/dev/dev.sh b/pkgs/dev/dev.sh index 2d71c41..924b39b 100755 --- a/pkgs/dev/dev.sh +++ b/pkgs/dev/dev.sh @@ -1,15 +1,18 @@ #!/usr/bin/env bash set -eu -target="$1" +target="${1:-}" shift +declare -a nixargs known_shells="$(tr ':' '\n' <<<"${DEV_SHELLS:-}")" while IFS='=' read name drv res; do if [ "$target" == "$name" ]; then target="$drv" + # Note: we do not need substituters as this should be build + nixargs+=("--no-substitute") break fi done <<<"$known_shells" -exec nix develop "$target" -c zsh "$@" +exec nix "${nixargs[@]}" develop "$target" -c zsh "$@" -- cgit v1.2.3