nixpkgs/pkgs/os-specific/darwin/signing-utils/post-link-sign-hook.nix
2023-08-01 21:27:09 +02: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
'';
}