darwin.postLinkSignHook: init

+16
+16
pkgs/top-level/darwin-packages.nix
··· 14 14 selfTargetTarget = pkgsTargetTarget.darwin or {}; # might be missing 15 15 }; 16 16 17 + # Prefix for binaries. Customarily ends with a dash separator. 18 + # 19 + # TODO(@Ericson2314) Make unconditional, or optional but always true by 20 + # default. 21 + targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) 22 + (stdenv.targetPlatform.config + "-"); 17 23 in 18 24 19 25 lib.makeScopeWithSplicing splicePackages newScope otherSplices (_: {}) (spliced: spliced.apple_sdk.frameworks) (self: let ··· 103 109 } ../os-specific/darwin/print-reexports/setup-hook.sh; 104 110 105 111 sigtool = callPackage ../os-specific/darwin/sigtool { }; 112 + 113 + postLinkSignHook = pkgs.writeTextFile { 114 + name = "post-link-sign-hook"; 115 + executable = true; 116 + 117 + text = '' 118 + CODESIGN_ALLOCATE=${targetPrefix}codesign_allocate \ 119 + ${self.sigtool}/bin/codesign -f -s - "$linkerOutput" 120 + ''; 121 + }; 106 122 107 123 maloader = callPackage ../os-specific/darwin/maloader { 108 124 };