Add Python package via overlay

The PR documents a pattern like this

(final: prev: {
  pythonPackagesOverlays = prev.pythonPackagesOverlays ++ [
    (
      python-final: python-prev: {
        foo = ...;
      }
    )
  ];
})

but that same commit introduces numerous changes to various files in the nixpkgs infrastructure, from which I infer that the documented approach depends on those changes. As the PR has not been merged, it would seem that this approach is not going to work in a current nixpkgs. What have I misunderstood?