Skip to content

Fail if flake.nix inputs point to a missing branch #49

@srid

Description

@srid

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.
image

Are there better approaches?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions