Failed to rebuild gcc9 with source code

Hello, I recently rebuilt gcc9 with source code,the overlay file is like as follow:

with pkgs;
  gcc9 = lowPrio (wrapCC ( ( oldAttrs : rec  {
           src = [ ./gcc-9.4.0.tar.gz ];
           buildInputs = (oldAttrs.buildInputs or [] ) ++ [ flex ];

when I add flex
it report error as follows:
anonymous function at fetchurl/boot.nix:5:1 called with unexpected argument ‘meta’
at fetchpatch/default.nix:18:1:

this behavior is strange,this overlay file works well for gcc7,gcc8 and gcc10,but not for gcc9

then when I remove buildInputs attribute,it pull the dependency packages from,but I have already substituted the nix-channel, this behavior don’t present at rebuild of other gcc version, except for gcc9.

Finally,it report as follows:

And, I have compared the default.nix of gcc9 with gcc10,there are little difference,except for the patches attribute. I noticed that there is a note inside default.nix of gcc9, but I don’t get it.

this package is used for bootstrapping fetchurl, and thus
cannot use fetchpatch! All mutable patches (generated by GitHub or cgit) that are needed here should be included directly in Nixpkgs as files.

I have also tried to rebuild gcc9 with default.nix of gcc10 after overlaying its patches attrs ,and it works.

So, how to explain this strange behavior? Or what details did I miss?