You no longer need to wait for PRs get merged. … or for the merged PRs to land in your channel.
You no longer need to craft overlays to change package versions, or replace packages from a PR.
You no longer need to write disableModules and imports to use a NixOS module from a PR.
You no longer need to maintain your own fork of nixpkgs.
All you need is declaring a new flake input with the PR diff:
issues with naming and/or ordering of patches (sometimes they need to be applied in the correct order)
mutating references to patches: I was never sure I’d get the exact patch/PR version that I expected and I’m pretty sure this gave some issues when building configurations after some time has passed since the last flake update
caching those locally solved this issue for me
Didn’t dig much into how you’re doing the patching, but:
you might want to add ?full_index=1 to the examples, github likes to truncate the references to different lengths
does your solution work properly and reproducibly when referencing those mutating references? eg: PRs that are heavily worked on
PS: I love that you have also figured out and wrote down many different ways you can reference a patch on GitHub, was about to suggest my config.toml comments, but you seem to have it all
you might want to add ?full_index=1 to the examples, github likes to truncate the references to different lengths
That’s interesting, I see the index line in the diff is the full commit hash, but I don’t really see the value in that for typing those few characters out. When does github truncate it to different lengths? Is the same length not guaranteed when using the same URLs at different times?
does your solution work properly and reproducibly when referencing those mutating references? eg: PRs that are heavily worked on
With a URL like https://github.com/NixOS/nixpkgs/pull/410328.diff you can get different patches on different systems (however when it changes you’ll see that flake.lock is dirty), doing a nix flake update nixpkgs-patch-git-review-bump will get you the currently latest patch.
To ensure reproducibility, you can pin it to a specific commit hash, or a range of commits with compare and commit hashes like https://github.com/NixOS/nixpkgs/compare/b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef...0330cef96364bfd90694ea782d54e64717aced63.diff (after a force-push to the PR, IIRC GitHub should show that those commits don’t belong to any branch but still be available for download).