From 676ef103771aa3fc4b150290294b8ad5610d2750 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 25 Oct 2018 00:30:34 +0900 Subject: 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. --- tests/programs-zsh.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/programs-zsh.nix') 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" -- cgit v1.2.3