core/pkgs/by-name/da/darwin/packages/signing-utils/post-link-sign-hook.nix

14 lines
321 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
{ 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
'';
}