This PR applies the patches which fix a MIPS-specific bug in patchelf.
The patches are applied only if targetPlatform.isMips in order to:
1. Not cause a mass-rebuild on the mainstream platforms
2. Make this PR acceptable for inclusion in `master` rather than
`staging`.
This is the very last commit needed in order for Hydra to be able to
produce a bootstrap-files tarball for mips64el (the other one is in
`staging-next`).
This PR can be reverted after the next release of patchelf lands in
nixpkgs.