File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
pkgs/by-name/br/breakpointHook Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ elif [ "$(echo "$pids" | wc -l)" -ne 1 ]; then
5656fi
5757pid=" $( echo " $pids " | head -n1) "
5858
59+
60+ # get the build top level directory inside the sandbox (eg. /build)
61+ buildDir=$( getVar NIX_BUILD_TOP)
62+
5963# bash is needed to load the env vars, as we do not know the syntax of the debug shell.
6064# bashInteractive is used instead of bash, as we depend on it anyways, due to it being
6165# the default debug shell
@@ -71,11 +75,11 @@ pwd="$(readlink /proc/$pid/cwd)"
7175# If another shell is chosen via `debugShell`, it will only have simple env vars avaialable.
7276exec nsenter --mount --ipc --uts --pid --net --target " $pid " " $bashInteractive " -c "
7377 set -eu -o pipefail
74- source /build/ env-vars
78+ source \" $buildDir / env-vars\"
7579 cd \" $pwd \"
7680 if [ -n \" $debugShell \" ]; then
7781 exec \" $debugShell \"
7882 else
79- exec \" $bashInteractive \" --init-file /build/ env-vars
83+ exec \" $bashInteractive \" --init-file \" $buildDir / env-vars\"
8084 fi
8185"
You can’t perform that action at this time.
0 commit comments