anchor.diff:  { stdenv
   , autoconf_21x
  +, fetchTritonPatch
   , fetchurl
  -, fetchzip
   , lib
   , perl
   , python2
  -, which
   
   , icu
   , libffi
  
positive.code: , zlib
  
  , channel
  }:
  
  # >=45.0.0 should use the releases in the murcurial repo at:
  
negative.code:   # Fixes an issue with gcc7 c++ strictness
    CXXFLAGS = "-fpermissive";
  
    patches = optionals (channel == "52") [
      (fetchTritonPatch {
        rev = "b87ef54138a1e54298f50eb298b45475d0d0ba0e";
        file = "s/spidermonkey/52-fix-linking-mozglue.patch";
        sha256 = "5a84f02521f37de873991dd360a4c4bfdbdd2fb4a218e11be73f9cbbf02050e8";
      })
    ];
  
    # Make sure we don't get spurius regeneration warnings
    postPatch = optionalString (channel == "52") ''
      touch js/src/configure
    '';
  
    preConfigure = /* configure cannot be executed in the build directory */ ''
      mkdir -pv build/
      cd build/
      configureScript=../js/src/configure
    '';
  
    configureFlags = [
      "--disable-tests"
      "--disable-debug-symbols"
      "--enable-readline"
      "--with-intl-api"
      "--with-system-icu"
      "--with-system-zlib"
    ] ++ optionals (ctypes) [
      "--enable-ctypes"
      "--with-system-ffi"
      "--with-system-nspr"
    ];
  
    postFixup = ''
  