Skip to content

Commit 5661ee8

Browse files
committed
flake.nix: hevmRedistributable: sign resulting darwin binary
1 parent 3069c5c commit 5661ee8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@
134134
grep = "${pkgs.gnugrep}/bin/grep";
135135
otool = "${pkgs.darwin.binutils.bintools}/bin/otool";
136136
install_name_tool = "${pkgs.darwin.binutils.bintools}/bin/install_name_tool";
137+
codesign_allocate = "${pkgs.darwin.binutils.bintools}/bin/codesign_allocate";
138+
codesign = "${pkgs.darwin.sigtool}/bin/codesign";
137139
in if pkgs.stdenv.isLinux
138140
then pkgs.haskell.lib.dontCheck hevmUnwrapped
139141
else pkgs.runCommand "stripNixRefs" {} ''
@@ -151,6 +153,7 @@
151153
chmod 777 $out/bin/hevm
152154
${install_name_tool} -change "$cxx" /usr/lib/libc++.1.dylib $out/bin/hevm
153155
${install_name_tool} -change "$iconv" /usr/lib/libiconv.dylib $out/bin/hevm
156+
CODESIGN_ALLOCATE=${codesign_allocate} ${codesign} -f -s - $out/bin/hevm
154157
chmod 555 $out/bin/hevm
155158
'';
156159

0 commit comments

Comments
 (0)