treewideMainProgram: set mindepth

This commit is contained in:
2025-03-23 18:39:46 +01:00
parent 3e9adec983
commit 34f700ae2a
2 changed files with 41 additions and 3 deletions

View File

@@ -9,11 +9,11 @@ for FILE in $FILES_WITHOUT_MAINPROGRAM; do
PACKAGE=$(dirname "$FILE" | sed 's|^./||')
echo "Building: $PACKAGE"
NIXPKGS_ALLOW_UNFREE=1 nix build ".#$PACKAGE" --impure || continue
NIXPKGS_ALLOW_UNFREE=1 nix build --option builders '' ".#$PACKAGE" --impure || continue
if [ "$(find result/bin | wc -w)" == 1 ]; then
if [ "$(find result/bin -mindepth 1 | wc -w)" == 1 ]; then
echo "$PACKAGE: $(ls result/bin)" >> packages.txt
elif [ "$(find result-bin/bin | wc -w)" == 1 ]; then
elif [ "$(find result-bin/bin -mindepth 1 | wc -w)" == 1 ]; then
echo "$PACKAGE: $(ls result-bin/bin)" >> packages.txt
fi