How to install deb or rpm - #5 by bme has the minimal code to unpack a deb (you’ll need to substitute url / hash). You will need to adapt the contents to work as a cups driver. You should look at other drivers for brother printers to gain an intuition of what derivation output needs to look like to function. See also this thread for another example of patching a brother driver.