mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
7dc24c0923
Accidentally reverted this while fixing merge conflicts on #149423.
43 lines
901 B
Nix
43 lines
901 B
Nix
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
name = "starship";
|
|
meta.maintainers = pkgs.starship.meta.maintainers;
|
|
|
|
machine = {
|
|
programs = {
|
|
fish.enable = true;
|
|
zsh.enable = true;
|
|
|
|
starship = {
|
|
enable = true;
|
|
settings.format = "<starship>";
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = map
|
|
(shell: pkgs.writeScriptBin "expect-${shell}" ''
|
|
#!${pkgs.expect}/bin/expect -f
|
|
|
|
spawn env TERM=xterm ${shell} -i
|
|
|
|
expect "<starship>" {
|
|
send "exit\n"
|
|
} timeout {
|
|
send_user "\n${shell} failed to display Starship\n"
|
|
exit 1
|
|
}
|
|
|
|
expect eof
|
|
'')
|
|
[ "bash" "fish" "zsh" ];
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
machine.wait_for_unit("default.target")
|
|
|
|
machine.succeed("expect-bash")
|
|
machine.succeed("expect-fish")
|
|
machine.succeed("expect-zsh")
|
|
'';
|
|
})
|