summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-02-23 11:43:39 +0100
committerDaiderd Jordan <daiderd@gmail.com>2019-02-23 12:00:39 +0100
commit6c6c8f21645f23c75bc25417c4fe6d5fb02eabd4 (patch)
tree464759deb679d6f06c2bafe16ef1c31325b33677 /tests
parentece03c592e6d254210dbd5f5dbf3032312246f03 (diff)
users.users: only extend profiles if packages are defined
Diffstat (limited to 'tests')
-rw-r--r--tests/environment-path.nix4
-rw-r--r--tests/users-packages.nix3
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/environment-path.nix b/tests/environment-path.nix
index d347c7d..7d2f46d 100644
--- a/tests/environment-path.nix
+++ b/tests/environment-path.nix
@@ -4,10 +4,10 @@ with lib;
{
test = ''
- echo checking /run/current-system/sw/bin in setEnvironment >&2
+ echo checking /run/current-system/sw/bin in environment >&2
grep 'export PATH=.*:/run/current-system/sw/bin' ${config.system.build.setEnvironment}
- echo checking /bin and /sbin in setEnvironment >&2
+ echo checking /bin and /sbin in environment >&2
grep 'export PATH=.*:/usr/bin:/usr/sbin:/bin:/sbin' ${config.system.build.setEnvironment}
'';
}
diff --git a/tests/users-packages.nix b/tests/users-packages.nix
index c7d9895..0233897 100644
--- a/tests/users-packages.nix
+++ b/tests/users-packages.nix
@@ -24,5 +24,8 @@ in
echo checking for unexpected paths in /etc/profiles/per-user/foo/bin >&2
test -e ${config.out}/etc/profiles/per-user/foo/lib/libhello.dylib && return
+
+ echo "checking /etc/profiles/per-user/foo/bin in environment" >&2
+ grep 'export PATH=.*:/etc/profiles/per-user/$USER/bin' ${config.system.build.setEnvironment}
'';
}