diff options
author | Karel Kočí <cynerd@email.cz> | 2022-11-15 15:07:34 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-11-15 16:30:16 +0100 |
commit | fbc988088c25ab6a81e786a9554cb03e8ead4958 (patch) | |
tree | c5db2823b4c21118da8987157935ae0068af16f1 /pkgs/dev | |
parent | 0d5e13b2606ec4c99872dfe3b5cc949c9dea41e1 (diff) | |
download | nixos-personal-fbc988088c25ab6a81e786a9554cb03e8ead4958.tar.gz nixos-personal-fbc988088c25ab6a81e786a9554cb03e8ead4958.tar.bz2 nixos-personal-fbc988088c25ab6a81e786a9554cb03e8ead4958.zip |
pkgs/dev: allow running without argument
Diffstat (limited to 'pkgs/dev')
-rwxr-xr-x | pkgs/dev/dev.sh | 7 |
1 files changed, 5 insertions, 2 deletions
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 "$@" |