aboutsummaryrefslogtreecommitdiff
path: root/src/nix/get-env.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-06 18:34:58 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-07-06 18:34:58 +0200
commit68f524d717bb53e5faee8c7ff0a1f9d18dccbead (patch)
tree173928c7ec4daf0f487946b46ded6190a3cf20f4 /src/nix/get-env.sh
parentcd8eb8a7d1bd4d2405df9f0d6aeeaa3e24c7d593 (diff)
nix develop: Support derivations with multiple outputs
Diffstat (limited to 'src/nix/get-env.sh')
-rw-r--r--src/nix/get-env.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nix/get-env.sh b/src/nix/get-env.sh
index a25ec43a9..2e0e83561 100644
--- a/src/nix/get-env.sh
+++ b/src/nix/get-env.sh
@@ -1,9 +1,18 @@
set -e
if [ -e .attrs.sh ]; then source .attrs.sh; fi
+
+outputs=$_outputs_saved
+for __output in $_outputs_saved; do
+ declare "$__output"="$out"
+done
+unset _outputs_saved __output
+
export IN_NIX_SHELL=impure
export dontAddDisableDepTrack=1
+
if [[ -n $stdenv ]]; then
source $stdenv/setup
fi
+
export > $out
set >> $out