lockFileMaintenance
does not refresh Nix flake.lock
files unless a string like "github:NixOS/nixpkgs/anything"
is present in flake.nix
#29721
Labels
manager:nix
Nix package manager
priority-3-medium
Default priority, "should be done" but isn't prioritised ahead of others
type:bug
Bug fix of existing functionality
Discussed in #29706
Originally posted by ipetkov June 16, 2024
What would you like help with?
I think I found a bug
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Gitea Action, container: ghcr.io/renovatebot/renovate:37.406.2
Please tell us more about your question or problem
https://github.com/ipetkov/renovate-reproduction-flake-maintenance
Current behavior
When
lockFileMaintenance
and thenix
manager are enabled,flake.lock
filesare only refreshed if
flake.nix
contains a string like"github:NixOS/nixpkgs/anything"
(including the double quotes.anything
can be replaced with any alpha-numeric string of characters).Expected behavior
I would expect that when
lockFileMaintenance
and thenix
manager areenabled, then
flake.lock
will always be refreshed, regardless of thecontents/inputs defined in
flake.nix
.A workaround for this bug is to inject a dummy string to satisfy Renovate's
hard-coded regex:
Suggested Alternative
Rather than using a regex to detect inputs to nixpkgs in
flake.nix
, Renovate can parseflake.lock
(which is a JSON file) and detect all git project/repo/commit combinations.Logs (if relevant)
Logs
Logs with workaround applied
The text was updated successfully, but these errors were encountered: