Flake: patch inputs?

Is there existing reasoning over a hypothetical patches facility for flakes?

{
  inputs.foo.patches = [ # in order merged
     "abgc6h"; # same remote
     "ref/pr/123"; # same remote pull request
    {
       url = "github:foo/bar/abgckh"; # different remote
    }
  ];
}

Evaluation fails if patches don’t merge cleanly.

If they where supported, (non-local) patches are inputs after all.

1 Like

What exactly do you want to patch?

The flake itself or some of its outputs?

Effektively the source tree of the underlying flake itself. In practical terms, I ultimately desire to have a dirt cheap, elegant and quick way of pulling in (several!) Pull Requests (for the most time) without the need to fork and build an aggregated branch manually.

If I use a fork as input, the input declaration — while formally true — loses semantic richeness: it might be valuable for an observer to see at first glance what (temporary!) patches are applied on any given input instead of perceiving a “fork”.