nix build won't necessarily catch this due to the possibility of these inputs being cached.
There's no standard way to do this. But here's one trick that works:
- Remove
"ref" field (pointing to custom branch) from flake.lock for all our inputs
- Then, run
nix --refresh flake archive which should recreate flake.lock, thus reverting our changes if successful, after refetching those branches.
Are there better approaches?
nix buildwon't necessarily catch this due to the possibility of these inputs being cached.There's no standard way to do this. But here's one trick that works:
"ref"field (pointing to custom branch) fromflake.lockfor all our inputsnix --refresh flake archivewhich should recreateflake.lock, thus reverting our changes if successful, after refetching those branches.Are there better approaches?