darwin.postLinkSignHook: drop and add to darwin-aliases.nix

The ld64 in the updated bootstrap tools is capable of code-signing, so
this hook is no longer needed.
This commit is contained in:
Randy Eckenrode 2025-02-23 02:09:52 -05:00
parent 83ee31f348
commit 87ed486d42
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9
4 changed files with 3 additions and 21 deletions

View file

@ -1,17 +0,0 @@
{
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
'';
}

View file

@ -647,8 +647,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
selfDarwin: superDarwin: {
signingUtils = prevStage.darwin.signingUtils.override { inherit (selfDarwin) sigtool; };
postLinkSignHook = prevStage.darwin.postLinkSignHook.override { inherit (selfDarwin) sigtool; };
# Rewrap binutils with the real libSystem
binutils = superDarwin.binutils.override {
inherit (self) coreutils;

View file

@ -85,4 +85,7 @@ mapAliases ({
### O ###
opencflite = pkgs.opencflite; # added 2024-05-02
### P ###
postLinkSignHook = throw "'darwin.postLinkSignHook' has been removed because it is obsolete"; # added 2025-02-23
})

View file

@ -192,8 +192,6 @@ makeScopeWithSplicing' {
signingUtils = callPackage ../os-specific/darwin/signing-utils { };
postLinkSignHook = callPackage ../os-specific/darwin/signing-utils/post-link-sign-hook.nix { };
autoSignDarwinBinariesHook = pkgs.makeSetupHook {
name = "auto-sign-darwin-binaries-hook";
propagatedBuildInputs = [ self.signingUtils ];