Skip to content

lockFlake(): When updating a lock, respect the input's lock file#137

Merged
cole-h merged 1 commit intodetsys-mainfrom
eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update
Jul 9, 2025
Merged

lockFlake(): When updating a lock, respect the input's lock file#137
cole-h merged 1 commit intodetsys-mainfrom
eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update

Conversation

@edolstra
Copy link
Copy Markdown
Collaborator

@edolstra edolstra commented Jul 9, 2025

Motivation

For example, if a flake has a lock for a and a/b, and we change the flakeref for a, previously Nix would fetch the latest version of b rather than using the lock for b from a.

Fixes NixOS#8976. Updated version of NixOS#8977.

Context

@edolstra edolstra changed the title lockFlake(): When updating a lock, don't use the old locks lockFlake(): When updating a lock, respect the input's lock file Jul 9, 2025
@edolstra edolstra force-pushed the eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update branch from 043a540 to 2ecc515 Compare July 9, 2025 17:05
Copy link
Copy Markdown
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed it fixes the issue I saw.

@colemickens
Copy link
Copy Markdown
Member

I think it might also close out this old issue NixOS#6105.

@edolstra edolstra added this pull request to the merge queue Jul 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 9, 2025
@cole-h cole-h added this pull request to the merge queue Jul 9, 2025
Merged via the queue into detsys-main with commit facfff4 Jul 9, 2025
35 checks passed
@cole-h cole-h deleted the eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update branch July 9, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix flake lock does not lock transitive dependencies correctly

3 participants