nix-shell.md: Extend shellHook example

This commit is contained in:
Robert Hensing 2020-10-30 11:12:28 +01:00
parent b809c48ebb
commit d4c5d8d32a

View file

@ -41,10 +41,12 @@ to `nix-shell`. For example, the derivation attribute
shellHook =
''
echo "Hello shell"
export SOME_API_TOKEN="$(cat ~/.config/some-app/api-token)"
'';
```
will cause `nix-shell` to print `Hello shell`.
will cause `nix-shell` to print `Hello shell` and set the `SOME_API_TOKEN`
environment variable to a user-configured value.
# Options