mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
This commit fixes the usage of `extraSpecialArgs` for standalone nixvim installations and adds a test to ensure this. Fixes #779
26 lines
571 B
Nix
26 lines
571 B
Nix
{
|
|
makeNixvimWithModule,
|
|
pkgs,
|
|
}: let
|
|
generated = makeNixvimWithModule {
|
|
module = {importedArgument, ...}: {
|
|
extraConfigLua = ''
|
|
-- importedArgument=${importedArgument}
|
|
'';
|
|
};
|
|
extraSpecialArgs = {
|
|
importedArgument = "foobar";
|
|
};
|
|
};
|
|
in
|
|
pkgs.runCommand "special-arg-test" {
|
|
printConfig = "${generated}/bin/nixvim-print-init";
|
|
} ''
|
|
config=$($printConfig)
|
|
if ! "$printConfig" | grep -- '-- importedArgument=foobar'; then
|
|
echo "Missing importedArgument in config"
|
|
exit 1
|
|
fi
|
|
|
|
touch $out
|
|
''
|