From 0066b1175450fc73c7b296fef91050cb66f6d17b Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 23 Jul 2025 22:55:59 +0000 Subject: [PATCH] linkBinIntoOwnPackage: guard against the empty-bin/ case --- pkgs/by-name/trivial-builders/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/trivial-builders/package.nix b/pkgs/by-name/trivial-builders/package.nix index c67ebc79c..80937f7e3 100644 --- a/pkgs/by-name/trivial-builders/package.nix +++ b/pkgs/by-name/trivial-builders/package.nix @@ -137,6 +137,14 @@ ; in linkIntoOwnPackage pkg paths' { + postInstallCheck = '' + # assert that there's *something* in `bin/` + # if there isn't, the wildcard won't expand, and the `test -x` will fail. + binFiles=($out/bin/*) + for f in "''${binFiles[@]}"; do + test -x "$f" + done + ''; postFixup = '' # not all packages ship manpages or docs, # but we can't know if that's the case upfront, generically.