aboutsummaryrefslogtreecommitdiff
path: root/src/nix/get-env.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-30 13:05:29 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-30 13:05:29 +0200
commit2fcfc6c2c6ff144131d669ebfb2caa63c8b41417 (patch)
tree7cf48377c9dc39e802b63c3a0a9e2b9e80351627 /src/nix/get-env.sh
parentdf8e9d691c93ed800c0b1885d5cda70b058ace24 (diff)
nix dev-shell: Refactor script for getting the environment
Diffstat (limited to 'src/nix/get-env.sh')
-rw-r--r--src/nix/get-env.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nix/get-env.sh b/src/nix/get-env.sh
new file mode 100644
index 000000000..782f97b75
--- /dev/null
+++ b/src/nix/get-env.sh
@@ -0,0 +1,8 @@
+set -e
+export IN_NIX_SHELL=impure
+export dontAddDisableDepTrack=1
+if [[ -n $stdenv ]]; then
+ source $stdenv/setup
+fi
+export > $out
+set >> $out