1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

* Builtin function `getEnv' for getting environment variables.

This commit is contained in:
Eelco Dolstra 2006-09-24 17:48:41 +00:00
parent df8873e14a
commit e47e0c2dbe
4 changed files with 22 additions and 6 deletions

View file

@ -1,5 +1,7 @@
source common.sh
export TEST_VAR=foo # for eval-okay-getenv.nix
fail=0
for i in lang/parse-fail-*.nix; do

View file

@ -0,0 +1 @@
Str("foobar")

View file

@ -0,0 +1 @@
builtins.getEnv "TEST_VAR" + (if builtins.getEnv "NO_SUCH_VAR" == "" then "bar" else "bla")