Skip to content

Commit 17f5a93

Browse files
authored
Revert "fix(darwin): skip stripping to preserve code signatures instead of ad…"
This reverts commit c4ea0c1.
1 parent e2f68b7 commit 17f5a93

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

package.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@
7272
mkdir -p "$out/Applications/${applicationName}.app/Contents/Resources/distribution"
7373
ln -s ${policiesJson} "$out/Applications/${applicationName}.app/Contents/Resources/distribution/policies.json"
7474
75+
# Re-sign with correct identifier to maintain AdGuard compatibility
76+
# AdGuard uses code signing identifier (not CFBundleIdentifier) to recognize apps
77+
/usr/bin/codesign --force --deep --sign - \
78+
--identifier "app.zen-browser.zen" \
79+
"$out/Applications/${applicationName}.app"
80+
7581
# Use symlink path to avoid installs.ini accumulation on Nix rebuilds
7682
# The symlink is created by home-manager and remains stable across rebuilds
7783
cat > "$out/bin/${binaryName}" << EOF
@@ -213,12 +219,6 @@ in
213219
# Firefox uses "relrhack" to manually process relocations from a fixed offset
214220
patchelfFlags = ["--no-clobber-old-sections"];
215221

216-
# Stripping invalidates macOS code signatures. We avoid strip-and-re-sign
217-
# because /usr/bin/codesign is inaccessible in the Nix sandbox. This also
218-
# preserves the original code signing identifier that tools like AdGuard
219-
# use (not CFBundleIdentifier) to recognize apps.
220-
dontStrip = stdenv.hostPlatform.isDarwin;
221-
222222
preFixup = ''
223223
gappsWrapperArgs+=(
224224
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ffmpeg_7]}"

0 commit comments

Comments
 (0)