diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-05-13 01:20:49 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-22 19:15:57 +0200 |
commit | 447928bdb55d160617387e7ac5954f9a8f36004b (patch) | |
tree | 762c55292b24cd0f64aa2272839355f81906d422 /src/nix/get-env.sh | |
parent | 3944a120ec6986c723bf36bfade9b331dd4af68a (diff) |
Fix usage of structured attrs for `nix develop`
Diffstat (limited to 'src/nix/get-env.sh')
-rw-r--r-- | src/nix/get-env.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nix/get-env.sh b/src/nix/get-env.sh index 091c0f573..b6b8310a9 100644 --- a/src/nix/get-env.sh +++ b/src/nix/get-env.sh @@ -8,7 +8,13 @@ if [[ -n $stdenv ]]; then source $stdenv/setup fi -for __output in $outputs; do +if [ -e .attrs.sh ]; then + __olist="${!outputs[@]}" +else + __olist=$outputs +fi + +for __output in $__olist; do if [[ -z $__done ]]; then export > ${!__output} set >> ${!__output} |