anchor.diff:  { lib, stdenv
   , fetchurl
  -, fetchpatch
   , autoconf213
   , pkg-config
   , perl
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "spidermonkey";
    version = "78.4.0";
  
    src = fetchurl {
      url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
      sha256 = "1z3hj45bnd12z3g6ajv9qrgclca7fymi1sxj9l9nh9q6y6xz0g4f";
    };
  
    outputs = [ "out" "dev" ];
  
negative.code: 
    enableParallelBuilding = true;
  
    postPatch = ''
      # This patch is a manually applied fix of
      #   https://bugzilla.mozilla.org/show_bug.cgi?id=1644600
      # Once that bug is fixed, this can be removed.
      # This is needed in, for example, `zeroad`.
      substituteInPlace js/public/StructuredClone.h \
           --replace "class SharedArrayRawBufferRefs {" \
                     "class JS_PUBLIC_API SharedArrayRawBufferRefs {"
    '';
  
    meta = with lib; {
      description = "Mozilla's JavaScript engine written in C/C++";
      homepage = "https://spidermonkey.dev/";
      license = licenses.gpl2; # TODO: MPL/GPL/LGPL tri-license.
      maintainers = with maintainers; [ abbradar lostnet ];
      platforms = platforms.linux;
  