diff --git a/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh b/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh index 430aba8cdc7e..cca65661f8a9 100644 --- a/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh +++ b/pkgs/os-specific/darwin/signing-utils/auto-sign-hook.sh @@ -1,4 +1,4 @@ -fixupOutputHooks+=('signDarwinBinariesIn $prefix') +postFixupHooks+=(signDarwinBinariesInAllOutputs) # Uses signingUtils, see definition of autoSignDarwinBinariesHook in # darwin-packages.nix @@ -14,7 +14,18 @@ signDarwinBinariesIn() { return 0 fi + echo "signing $dir" + while IFS= read -r -d $'\0' f; do signIfRequired "$f" done < <(find "$dir" -type f -print0) } + +# Apply fixup to each output. +signDarwinBinariesInAllOutputs() { + local output + + for output in $outputs; do + signDarwinBinariesIn "${!output}" + done +}