aboutsummaryrefslogtreecommitdiff
path: root/src/nix/get-env.sh
blob: b6b8310a9b31b39032513847faa339521185626d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
set -e
if [ -e .attrs.sh ]; then source .attrs.sh; fi

export IN_NIX_SHELL=impure
export dontAddDisableDepTrack=1

if [[ -n $stdenv ]]; then
    source $stdenv/setup
fi

if [ -e .attrs.sh ]; then
    __olist="${!outputs[@]}"
else
    __olist=$outputs
fi

for __output in $__olist; do
    if [[ -z $__done ]]; then
        export > ${!__output}
        set >> ${!__output}
        __done=1
    else
        echo -n >> ${!__output}
    fi
done