1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

kakoune: clean up tests

- Enable use-plugins test.

- Stub out `kakoune-unwrapped` to avoid unnecessary downloads.

- Unwrap unnecessary `config` attributes.
This commit is contained in:
Robert Helgesson 2021-11-07 09:42:31 +01:00
parent c678162e20
commit 2917ef23b3
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
6 changed files with 61 additions and 51 deletions

View file

@ -1,8 +1,6 @@
{ {
kakoune-no-plugins = ./no-plugins.nix; kakoune-no-plugins = ./no-plugins.nix;
# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/110196 kakoune-use-plugins = ./use-plugins.nix;
# reaches the unstable channel.
# kakoune-use-plugins = ./use-plugins.nix;
kakoune-whitespace-highlighter = ./whitespace-highlighter.nix; kakoune-whitespace-highlighter = ./whitespace-highlighter.nix;
kakoune-whitespace-highlighter-corner-cases = kakoune-whitespace-highlighter-corner-cases =
./whitespace-highlighter-corner-cases.nix; ./whitespace-highlighter-corner-cases.nix;

View file

@ -3,11 +3,11 @@
with lib; with lib;
{ {
config = { imports = [ ./stubs.nix ];
programs.kakoune = { enable = true; }; programs.kakoune = { enable = true; };
nmt.script = '' nmt.script = ''
assertPathNotExists home-path/share/kak/autoload/plugins assertPathNotExists home-path/share/kak/autoload/plugins
''; '';
};
} }

View file

@ -0,0 +1,12 @@
{
test.stubs.kakoune-unwrapped = {
name = "dummy-kakoune";
version = "1";
outPath = null;
buildScript = ''
mkdir -p $out/bin $out/share/kak/doc
touch $out/bin/kak
chmod +x $out/bin/kak
'';
};
}

View file

@ -3,14 +3,14 @@
with lib; with lib;
{ {
config = { imports = [ ./stubs.nix ];
programs.kakoune = { programs.kakoune = {
enable = true; enable = true;
plugins = [ pkgs.kakounePlugins.kak-prelude ]; plugins = [ pkgs.kakounePlugins.prelude-kak ];
}; };
nmt.script = '' nmt.script = ''
assertDirectoryNotEmpty home-path/share/kak/autoload/plugins assertDirectoryNotEmpty home-path/share/kak/autoload/plugins
''; '';
};
} }

View file

@ -3,7 +3,8 @@
with lib; with lib;
{ {
config = { imports = [ ./stubs.nix ];
programs.kakoune = { programs.kakoune = {
enable = true; enable = true;
config.showWhitespace = { config.showWhitespace = {
@ -21,5 +22,4 @@ with lib;
assertFileContains home-files/.config/kak/kakrc \ assertFileContains home-files/.config/kak/kakrc \
"add-highlighter global/ show-whitespaces -tab \"'\" -spc ' ' -nbsp ' ' -lf '\"'" "add-highlighter global/ show-whitespaces -tab \"'\" -spc ' ' -nbsp ' ' -lf '\"'"
''; '';
};
} }

View file

@ -3,7 +3,8 @@
with lib; with lib;
{ {
config = { imports = [ ./stubs.nix ];
programs.kakoune = { programs.kakoune = {
enable = true; enable = true;
config.showWhitespace = { config.showWhitespace = {
@ -21,5 +22,4 @@ with lib;
assertFileContains home-files/.config/kak/kakrc \ assertFileContains home-files/.config/kak/kakrc \
"add-highlighter global/ show-whitespaces -tab '4' -tabpad '5' -spc '2' -nbsp '3' -lf '1'" "add-highlighter global/ show-whitespaces -tab '4' -tabpad '5' -spc '2' -nbsp '3' -lf '1'"
''; '';
};
} }