豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Nix: update pinned tag refs in flake.nix #14670

@JamieMagee

Description

@JamieMagee

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

When a flake.nix input pins to a specific tag, Dependabot should detect newer tags and update the ref.

# before
inputs.devenv.url = "github:cachix/devenv/v0.5";

# after
inputs.devenv.url = "github:cachix/devenv/v0.5.1";

The PR would also regenerate flake.lock, which we already know how to do.

This is the second use case from #7340. We left it out of #14498 because it means parsing Nix syntax to find and rewrite URL strings in flake.nix. The lock file part is the easy bit.

Things to figure out:

  • Parsing. Nix syntax is not trivial to parse from Ruby, but input URLs follow a pretty predictable pattern. A regex over the raw file might be enough for common cases.
  • Tag ordering. Most flake inputs use semver-ish tags, but not all. What do we do with non-semver tags? Skip them? Treat any different tag as newer?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions