anchor.diff:    # 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='../configure'
  +    configureScript=../js/src/configure
     '';
   
     configureFlags = [
  -    "--enable-release"
  -    "--enable-pie"
  -    "--disable-debug"
  +    "--disable-tests"
  +    "--disable-debug-symbols"
       "--enable-readline"
  -    "--with-pthreads"
  -    "--enable-shared-js"
  +    "--with-intl-api"
  +    "--with-system-icu"
  +    "--with-system-zlib"
  +  ] ++ optionals (ctypes) [
  +    "--enable-ctypes"
  +    "--with-system-ffi"
       "--with-system-nspr"
  -    "--with-system-zlib"
  -    ###"--enable-system-ffi"
  -    "--disable-tests"
  -    "--enable-optimize"
  -    "--enable-jemalloc"
  -    "--enable-strip"
  -    "--enable-install-strip"
  -    "--enable-readline"
  -    "--with-system-icu"
  -  ] ++ optionals (versionAtLeast channel "45") [
  -    "--enable-gold"
     ];
   
     postFixup = ''
  
positive.code:     done
    '';
  
    buildParallel = versionAtLeast channel "45";
    installParallel = false;
  
    passthru = {
  
negative.code: { stdenv
  , autoconf_21x
  , fetchTritonPatch
  , fetchurl
  , lib
  , perl
  , python2
  
  , icu
  , libffi
  