Support relative paths of locked nodes in Flakes #1012

Open
opened 2025-10-13 10:13:10 +00:00 by raito · 0 comments
Owner

Came up as a request by @MangoIV in Matrix.

The idea is to support path:./foo paths inside Flakes only when they are valid, e.g. descendants of a locked directory.
This fixes #586.

Describe the solution you'd like

Path fetchers descendant of a locked directory should be considered locked and reuse the store path of their ancestor.

Describe alternatives you've considered

  • Do nothing and have people stumble in #586
  • Have people with new lockfile formats from CppNix stumble in "mutable lock" errors.

Additional context

CppNix did https://github.com/NixOS/nix/pull/10089. I'm not sure if we should follow the same schema.
Workaround: use CppNix interpreter with this feature in a shell.

## Is your feature request related to a problem? Please describe. Came up as a request by @MangoIV in Matrix. The idea is to support `path:./foo` paths inside Flakes only when they are valid, e.g. descendants of a locked directory. This fixes #586. ## Describe the solution you'd like Path fetchers descendant of a locked directory should be considered locked and reuse the store path of their ancestor. ## Describe alternatives you've considered - Do nothing and have people stumble in #586 - Have people with new lockfile formats from CppNix stumble in "mutable lock" errors. ## Additional context CppNix did https://github.com/NixOS/nix/pull/10089. I'm not sure if we should follow the same schema. Workaround: use CppNix interpreter with this feature in a shell.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#1012
No description provided.