builtins.fetchTree does not support a directly passed url, docs claim it does #1049

Open
opened 2025-11-22 22:40:52 +00:00 by helle · 0 comments
Member

@goldstein noticed that the behaviour of [builtins.fetchTree](https://docs.lix.systems/manual/lix/2.94/language/builtins.html#builtins-fetchTree) does not match the docs. Our current implementation of it does not actually support urls directly. I had also noticed this behavior earlier, but had presumed my environment was being weird.

This is requiring people to use "github:NixOS/nixpkgs" |> builtins.parseFlakeRef |> builtins.fetchTree or similar instead of builtins.fetchTree "github:NixOS/nixpkgs" .

This behaviour also deviates from CppNix which does actually support it.

There is of course the question, given that fetchTree is only available when flakes are enabled, if we actually want to enable people to use urls directly. But in that case we should at least fix the docs.

@goldstein noticed that the behaviour of `[builtins.fetchTree](https://docs.lix.systems/manual/lix/2.94/language/builtins.html#builtins-fetchTree)` does not match the docs. Our current implementation of it does not actually support urls directly. I had also noticed this behavior earlier, but had presumed my environment was being weird. This is requiring people to use `"github:NixOS/nixpkgs" |> builtins.parseFlakeRef |> builtins.fetchTree` or similar instead of `builtins.fetchTree "github:NixOS/nixpkgs" `. This behaviour also deviates from CppNix which does actually support it. There is of course the question, given that `fetchTree` is only available when `flakes` are enabled, if we actually want to enable people to use urls directly. But in that case we should at least fix the docs.
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#1049
No description provided.