mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 10:47:02 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
21 lines
510 B
Nix
21 lines
510 B
Nix
{
|
|
programs = {
|
|
fish.enable = true;
|
|
starship.enable = true;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/fish/config.fish
|
|
|
|
export GOT="$(tail -n 5 `_abs home-files/.config/fish/config.fish`)"
|
|
export NOT_EXPECTED="
|
|
if test \"\$TERM\" != dumb
|
|
/home/hm-user/.nix-profile/bin/starship init fish | source
|
|
|
|
end"
|
|
|
|
if [[ "$GOT" == "$NOT_EXPECTED" ]]; then
|
|
fail "Expected starship init to be inside the 'is-interactive' block but it wasn't."
|
|
fi
|
|
'';
|
|
}
|