mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 16:27:03 +00:00
add test for default environment.systemPath
This commit is contained in:
parent
1b6f56f5b8
commit
2ed3ca511f
2 changed files with 17 additions and 0 deletions
|
@ -88,6 +88,8 @@ let
|
||||||
examples.lnl = genExample ./modules/examples/lnl.nix;
|
examples.lnl = genExample ./modules/examples/lnl.nix;
|
||||||
examples.simple = genExample ./modules/examples/simple.nix;
|
examples.simple = genExample ./modules/examples/simple.nix;
|
||||||
|
|
||||||
|
tests.environment-path = makeTest ./tests/environment-path.nix;
|
||||||
|
|
||||||
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||||
|
|
||||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||||
|
|
15
tests/environment-path.nix
Normal file
15
tests/environment-path.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.bash.enable = true;
|
||||||
|
|
||||||
|
test = ''
|
||||||
|
echo checking /run/current-system/sw/bin in systemPath >&2
|
||||||
|
grep 'export PATH=.*:/run/current-system/sw/bin' ${config.out}/etc/bashrc
|
||||||
|
|
||||||
|
echo checking /bin and /sbin in systemPath >&2
|
||||||
|
grep 'export PATH=.*:/usr/bin:/usr/sbin:/bin:/sbin' ${config.out}/etc/bashrc
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue