Lock flake input to specific revision

Say I have a flake that has some input xyz sourced from a github repo.

Let’s say there are 3 different revisions / git hashes in that repo: A, B, and C. Say when I created the flake the current revision was A. That would be recorded in flake.lock. After some time passes, it moves to C and when I nix flake update it will move that input to C. However, say there’s an issue in C, so I don’t want that revision, but I want B since some issues from A were resolved in B.

Without figuring out the hashes manually and editing flake.lock directly, is there a way to set a specific input (xyz in this case) to a specific revision (B in this case)?

github:owner/repo/B or github:owner/repo?rev=B

1 Like