1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

system-path: add basic shell tests

This commit is contained in:
Daiderd Jordan 2017-03-11 22:28:51 +01:00
parent 8a67d1d4cf
commit 707cdd517b
No known key found for this signature in database
GPG key ID: D02435D05B810C96
4 changed files with 39 additions and 1 deletions

View file

@ -89,10 +89,12 @@ let
examples.simple = genExample ./modules/examples/simple.nix;
tests.system-packages = makeTest ./tests/system-packages.nix;
tests.system-path-bash = makeTest ./tests/system-path-bash.nix;
tests.system-path-fish = makeTest ./tests/system-path-fish.nix;
tests.system-path-zsh = makeTest ./tests/system-path-zsh.nix;
}
// (mapTestOn (packagePlatforms packageSet));
in
jobs

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
environment.systemPath = [ pkgs.hello ];
programs.bash.enable = true;
test = ''
echo checking systemPath in /etc/bashrc >&2
grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/bashrc
'';
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
environment.systemPath = [ pkgs.hello ];
programs.fish.enable = true;
test = ''
echo checking systemPath in /etc/fish/config.fish >&2
grep 'set PATH ${pkgs.hello}/bin' ${config.out}/etc/fish/config.fish
'';
}

12
tests/system-path-zsh.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
environment.systemPath = [ pkgs.hello ];
programs.zsh.enable = true;
test = ''
echo checking systemPath in /etc/zshrc >&2
grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/zshrc
'';
}