anchor.diff:        configureScript="$(realpath ./configure)"
         mkdir ../objdir
         cd ../objdir
  +
  +      # AS=as in the environment causes build failure https://bugzilla.mozilla.org/show_bug.cgi?id=1497286
  +      unset AS
       '';
   
     dontWrapGApps = true; # we do it ourselves
  
positive.code:       gappsWrapperArgs+=(
          --argv0 "$target"
          --set MOZ_APP_LAUNCHER thunderbird
        )
        ${
          # We wrap manually because wrapGAppsHook does not detect the symlink
  
negative.code:       nspr nss libnotify xorg.pixman yasm libGLU_combined
        xorg.libXScrnSaver xorg.xorgproto
        xorg.libXext sqlite unzip
        libevent libstartup_notification /* cairo */
        icu libpng jemalloc nasm
      ]
      ++ lib.optionals enableGTK3 [ gtk3 gnome3.adwaita-icon-theme ];
  
    # from firefox + m4 + wrapperTool
    # llvm is for llvm-objdump
    nativeBuildInputs = [ m4 autoconf213 which gnused pkgconfig perl python2 python3 nodejs wrapperTool cargo rustc rust-cbindgen llvmPackages.llvm ];
  
    patches = [
      # Remove buildconfig.html to prevent a dependency on clang etc.
      ./no-buildconfig.patch
    ]
    ++ lib.optional (lib.versionOlder version "69")
      (fetchpatch { # https://bugzilla.mozilla.org/show_bug.cgi?id=1500436#c29
        name = "write_error-parallel_make.diff";
        url = "https://hg.mozilla.org/mozilla-central/raw-diff/562655fe/python/mozbuild/mozbuild/action/node.py";
        sha256 = "11d7rgzinb4mwl7yzhidjkajynmxgmffr4l9isgskfapyax9p88y";
      });
  
    configureFlags =
      [ # from firefox, but without sound libraries (alsa, libvpx, pulseaudio)
  