Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions nix-debug-shell
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ dir=$(dirname $(readlink -f "$0"))
declare -a args

for arg in "$@"; do
case "$arg" in
--no-ccache)
noCCache=1
;;
*)
args+=("$arg")
esac

if [ -n "$nextArgIsPkg" ]; then
pkg="$arg"
nextArgIsPkg=
continue
fi

case "$arg" in
-A)
if [ -n "$pkg" ]; then
Expand All @@ -18,11 +27,6 @@ for arg in "$@"; do
fi
nextArgIsPkg=1
;;
--no-ccache)
noCCache=1
;;
*)
args+=("$arg")
esac
done

Expand All @@ -43,4 +47,4 @@ fi
mkdir -p "$buildDir"

#echo "noCCache: $noCCache, pkg: $pkg, args: ${args[@]}"
nix-shell -A "$pkg" --command "cd $buildDir; source $dir/env.sh; return" "${args[@]}"
nix-shell --command "cd $buildDir; source $dir/env.sh; return" "${args[@]}"