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

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
declare -a paths=(
"pkgs/shells"
"pkgs/os-specific/linux"
"pkgs/tools/admin"
"pkgs/tools/bluetooth"
"pkgs/tools/bootloaders"
"pkgs/tools/games"
"pkgs/tools/inputmethods"
"pkgs/tools/networking"
"pkgs/tools/nix"
"pkgs/tools/text"
"pkgs/applications/audio"
"pkgs/applications/display-managers"
"pkgs/applications/emulators"
"pkgs/applications/file-managers"
"pkgs/applications/finance"
"pkgs/applications/graphics"
"pkgs/applications/kde"
"pkgs/applications/logging"
"pkgs/applications/misc"
"pkgs/applications/office"
"pkgs/applications/plasma-mobile"
"pkgs/applications/printing"
"pkgs/applications/qubes"
"pkgs/applications/radio"
"pkgs/applications/science"
"pkgs/applications/search"
"pkgs/applications/system"
)
pushd "/home/h7x4/nixpkgs"
for subdir in "${paths[@]}"; do
cd "/home/h7x4/nixpkgs/$subdir"
/home/h7x4/git/nixpkgs-tools/treewideMainProgram/list_missing_main_programs.sh
done
popd