Commit cdb04035 authored by Ihar Hrachyshka's avatar Ihar Hrachyshka
Browse files

firefox-bin: strip signatures on darwin

The wrapper breaks signatures, and leaving them on binaries result in
firefox crashing on startup. While stripping them may break some plugins
that require them, at least the browser can start and be used as a
functional replacement for `firefox` derivation.
parent f02aa593
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -35,10 +35,20 @@

## configurability of the wrapper itself

browser:
browser_:

let
  isDarwin = stdenv.hostPlatform.isDarwin;
  browser =
    # Wrapper breaks codesigning on macOS; though plugins that may require
    # original mozilla signature (like 1Password) won't work with signatures
    # stripped, at least the wrapped browser will launch.
    if isDarwin then
      browser_.overrideAttrs (oldAttrs: {
        dontFixup = false;
      })
    else
      browser_;
  wrapper =
    {
      applicationName ? browser.binaryName or (lib.getName browser), # Note: this is actually *binary* name and is different from browser.applicationName, which is *app* name!