mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 02:36:54 +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.
19 lines
726 B
Nix
19 lines
726 B
Nix
{
|
|
programs.pistol = {
|
|
enable = true;
|
|
config = {
|
|
"text/*" =
|
|
"bat --paging=never --color=always --style=auto --wrap=character --terminal-width=%pistol-extra0% --line-range=1:%pistol-extra1% %pistol-filename%";
|
|
"application/json" =
|
|
"bat --paging=never --color=always --style=auto --wrap=character --terminal-width=%pistol-extra0% --line-range=1:%pistol-extra1% %pistol-filename%";
|
|
};
|
|
};
|
|
|
|
test.asserts.assertions.expected = [
|
|
(let offendingFile = toString ./config.nix;
|
|
in ''
|
|
The option definition `programs.pistol.config' in `${offendingFile}' no longer has any effect; please remove it.
|
|
Pistol is now configured with programs.pistol.associations.
|
|
'')
|
|
];
|
|
}
|