summaryrefslogtreecommitdiff
path: root/tests/programs-zsh.nix
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2018-10-25 00:30:34 +0900
committerAndrew Childs <lorne@cons.org.nz>2018-10-25 01:00:52 +0900
commit676ef103771aa3fc4b150290294b8ad5610d2750 (patch)
treea208b52ff962a4f0cfc0041cd5f473f6795a07dc /tests/programs-zsh.nix
parente6a698a7011487f16dd061d65e36ec330465ed16 (diff)
Unify environment configuration and don't run in child shells
This should enable `nix run` to work under shells like fish and zsh, as well as making child shells not needlessly reset any environment that should be inherited. Implementation adapted from NixOS.
Diffstat (limited to 'tests/programs-zsh.nix')
-rw-r--r--tests/programs-zsh.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/programs-zsh.nix b/tests/programs-zsh.nix
index 97afe47..af1b3dd 100644
--- a/tests/programs-zsh.nix
+++ b/tests/programs-zsh.nix
@@ -20,10 +20,10 @@
echo >&2 "checking for share/zsh in /sw"
test -e ${config.out}/sw/share/zsh
- echo >&2 "checking environment.systemPath in /etc/zshenv"
- grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/zshenv
- echo >&2 "checking SHELL in /etc/zshenv"
- grep 'export SHELL="${pkgs.zsh}/bin/zsh"' ${config.out}/etc/zshenv
+ echo >&2 "checking setEnvironment in /etc/zshenv"
+ fgrep '. ${config.system.build.setEnvironment}' ${config.out}/etc/zshenv
+ echo >&2 "checking SHELL in setEnvironment"
+ grep 'export SHELL="${pkgs.zsh}/bin/zsh"' ${config.system.build.setEnvironment}
echo >&2 "checking nix-shell return /etc/zshenv"
grep 'if test -n "$IN_NIX_SHELL"; then return; fi' ${config.out}/etc/zshenv
echo >&2 "checking zshenv.d in /etc/zshenv"