File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,45 @@ linkFarmFromDrvs "plugins-by-name" [
87
87
''
88
88
)
89
89
90
+ # Check default.nix files exist for each directory
91
+ ( runCommandNoCCLocal "default-nix-exists"
92
+ {
93
+ __structuredAttrs = true ;
94
+ missingPlugins = builtins . filter (
95
+ name : ! ( builtins . pathExists "${ by-name } /${ name } /default.nix" )
96
+ ) children . directory ;
97
+ missingTests = builtins . filter (
98
+ name : ! ( builtins . pathExists "${ ./test-sources/plugins/by-name } /${ name } /default.nix" )
99
+ ) children . directory ;
100
+ }
101
+ ''
102
+ declare -i errs=0
103
+
104
+ if (( '' ${#missingPlugins[@]} > 0 )); then
105
+ ((++errs))
106
+ echo "The following ('' ${#missingPlugins[@]}) directories do not have a default.nix file:"
107
+ for name in "'' ${missingPlugins[@]}"; do
108
+ echo " - plugins/by-name/$name"
109
+ done
110
+ echo
111
+ fi
112
+
113
+ if (( '' ${#missingTests[@]} > 0 )); then
114
+ ((++errs))
115
+ echo "The following ('' ${#missingTests[@]}) test files do not exist:"
116
+ for name in "'' ${missingTests[@]}"; do
117
+ echo " - tests/test-sources/plugins/by-name/$name/default.nix"
118
+ done
119
+ echo
120
+ fi
121
+
122
+ if (( $errs > 0 )); then
123
+ exit $errs
124
+ fi
125
+ touch $out
126
+ ''
127
+ )
128
+
90
129
# Ensures all plugin enable options are declared in a directory matching the plugin name
91
130
( runCommandNoCCLocal "mismatched-plugin-names"
92
131
{
You can’t perform that action at this time.
0 commit comments