Patching nixpkgs before import

Oh, I’ve just seen this: Support patching nixpkgs which goes into the matter. It points out problems with this approach which I’m not sure how to solve, so I guess I rescind my question until I’ve done further research.