File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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 ] } "
You can’t perform that action at this time.
0 commit comments