mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
35 lines
665 B
Nix
35 lines
665 B
Nix
{
|
|
makeNixvimWithModule,
|
|
runCommandLocal,
|
|
}:
|
|
let
|
|
extraFiles = {
|
|
"one".text = "one";
|
|
"two".text = "two";
|
|
"nested/in/dirs/file.txt".text = "nested";
|
|
"this/file/test.nix".source = ./extra-files.nix;
|
|
};
|
|
build = makeNixvimWithModule {
|
|
module = {
|
|
inherit extraFiles;
|
|
};
|
|
};
|
|
in
|
|
runCommandLocal "extra-files-test"
|
|
{
|
|
root = build.config.build.extraFiles;
|
|
files = builtins.attrNames extraFiles;
|
|
}
|
|
''
|
|
for file in $files; do
|
|
path="$root"/"$file"
|
|
if [[ -f "$path" ]]; then
|
|
echo "File $path exists"
|
|
else
|
|
echo "File $path is missing"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
touch $out
|
|
''
|