CppNix compat: path literals in flake inputs #1140

Open
opened 2026-02-24 14:11:12 +00:00 by goldstein · 0 comments
Member

CppNix added a feature a while ago that allows path literals in .input.url, like so:

# flake.nix
{
  inputs.a.url = ./a;
  outputs = _: {};
}
# a/flake.nix
{
  outputs = _: {};
}

relevant commit: github.com/NixOS/nix@3180671cab

Describe the solution you'd like

we could port this feature to Lix

Describe alternatives you've considered

we could avoid doing that. this is a compat wrinkle, but there’s a workaround of writing "path:" strings (although it’s a bit harder if an incompatible flake is in your (transitive) dependencies)

Additional context

I found this during a crater-like test run. I’ve seen a single repo that uses this in the wild, but there might be others.

I’m aware that flakes are currently frozen; this could be implemented after they thaw.

I can work on porting this patch if this is accepted.

## Is your feature request related to a problem? Please describe. CppNix added a feature a while ago that allows path literals in `.input.url`, like so: ```nix # flake.nix { inputs.a.url = ./a; outputs = _: {}; } # a/flake.nix { outputs = _: {}; } ``` relevant commit: https://github.com/NixOS/nix/commit/3180671cabeb6a6010057770731e12761ed5666c ## Describe the solution you'd like we could port this feature to Lix ## Describe alternatives you've considered we could avoid doing that. this is a compat wrinkle, but there’s a workaround of writing `"path:"` strings (although it’s a bit harder if an incompatible flake is in your (transitive) dependencies) ## Additional context I found this during a crater-like test run. I’ve seen a single repo that uses this in the wild, but there might be others. I’m aware that flakes are currently frozen; this could be implemented after they thaw. I can work on porting this patch if this is accepted.
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#1140
No description provided.