Skip to content

Make builtins.fetchTree return a path as its outPath element #10115

@thufschmitt

Description

@thufschmitt

Is your feature request related to a problem? Please describe.

(builtins.fetchTree foo).outPath is currently a string (pointing to a path in the Nix store).
This means that something like (builtins.fetchTree foo).outPath + "/foo" will copy the whole tree into the store (to get the outPath string), and then return that store path + /foo.

Describe the solution you'd like

Make it a path value instead, and benefit from the extra laziness of paths (thus getting part of the lazy-trees benefits).

This would mean that (builtins.fetchTree foo).outPath + "/foo" would be a path in its own right, and accessing it would only mean copyting the /foo subdirectory into the store.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

This is already implemented in the lazy trees branch, would have to be backported to master.

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

Labels

featureFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input locking

Type

No type

Projects

Status

Implementation

Relationships

None yet

Development

No branches or pull requests

Issue actions