anchor.diff:        nspr nss libnotify xorg.pixman yasm libGLU_combined
         xorg.libXScrnSaver xorg.xorgproto
         xorg.libXext sqlite unzip
  -      hunspell libevent libstartup_notification /* cairo */
  -      icu libpng jemalloc
  +      libevent libstartup_notification /* cairo */
  +      icu libpng jemalloc nasm
       ]
       ++ lib.optionals enableGTK3 [ gtk3 gnome3.adwaita-icon-theme ];
   
     # from firefox + m4 + wrapperTool
  -  nativeBuildInputs = [ m4 autoconf213 which gnused pkgconfig perl python wrapperTool cargo rustc ];
  +  # 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
  -
  -    # Needed on older branches since rustc: 1.32.0 -> 1.33.0
  -    (fetchurl {
  -      name = "missing-documentation.patch";
  -      url = "https://aur.archlinux.org/cgit/aur.git/plain/deny_missing_docs.patch"
  -          + "?h=firefox-esr&id=03bdd01f9cf";
  -      sha256 = "1i33n3fgwc8d0v7j4qn7lbdax0an6swar12gay3q2nwrhg3ic4fb";
  -    })
  -  ];
  +  ]
  +  ++ 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)
  
positive.code: { lib, stdenv, fetchurl, pkgconfig, gtk2, pango, perl, python, zip
  , libIDL, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
  , freetype, fontconfig, file, nspr, nss, libnotify
  , yasm, libGLU_combined, sqlite, unzip
  , hunspell, libevent, libstartup_notification
  , icu, libpng, jemalloc
  , autoconf213, which, m4
  , writeScript, xidel, common-updater-scripts, coreutils, gnused, gnugrep, curl, runtimeShell
  , cargo, rustc, llvmPackages
  , enableGTK3 ? false, gtk3, gnome3, wrapGAppsHook, makeWrapper
  , enableCalendar ? true
  , debugBuild ? false
  
negative.code:       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
  