core/pkgs/by-name/da/darwin/packages/signing-utils/post-link-sign-hook.nix
2024-05-13 11:34:52 -04:00

14 lines
321 B
Nix

{ writeTextFile, cctools, sigtool }:
writeTextFile {
name = "post-link-sign-hook";
executable = true;
text = ''
if [ "$linkerOutput" != "/dev/null" ]; then
CODESIGN_ALLOCATE=${cctools}/bin/${cctools.targetPrefix}codesign_allocate \
${sigtool}/bin/codesign -f -s - "$linkerOutput"
fi
'';
}