If I remember correctly, our avr-toolchain@5.5.0 package is broken, but the avr-toolchain@4.9.4 package works. Could you try with avr-toolchain@4.9.4 and see if the problem still persists? I successfully built the QMK firmware some half a year ago, and I used the avr-toolchain 4.9 to do it.