I wonder if this is a case of the built-in eval cache having seen an older revision of the GitHub repo that was missing something freshly introduced that you wanted to immediately use. This wouldn’t apply for a file URL and would go away on its own after the TTL expired. There’s ways to force it to refetch using a CLI flag that I can’t type from memory.
Alright, I managed to fix the issue. It looked indeed like some caching bad luck. I started paying closer attention to the revisions being set on my flake.lock file, and it was not always being updated even when using --refresh, so I guess that was it.
Being more explicit by running nix flake lock --update-inputs nix-config before building anything did the trick, so lesson learned for me today, hope this is useful to anyone experiencing the same issue.