Skip to content

Commit

Permalink
Add native mac build of cc-sign
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Sep 4, 2024
1 parent 54639c7 commit d01cfdb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nix/outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@ in
(lib.optionalAttrs pkgs.stdenv.isLinux {
hydraJobs.musl64 = project.cross.musl64.hydraJobs;
})
(lib.optionalAttrs pkgs.stdenv.isDarwin (rec {
packages.cc-sign-native = pkgs.runCommand "cc-sign"
{
nativeBuildInputs = [
pkgs.macdylibbundler
pkgs.darwin.autoSignDarwinBinariesHook
];
} ''
mkdir -p $out/bin
cp ${project.packages.cc-sign}/bin/cc-sign $out/bin/cc-sign
chmod 755 $out/bin/cc-sign
dylibbundler -b --no-codesign \
-x $out/bin/cc-sign \
-d $out/bin \
-p '@executable_path'
signDarwinBinariesInAllOutputs
'';
hydraJobs.cc-sign-native = cc-sign-native;
}))
]

0 comments on commit d01cfdb

Please sign in to comment.