Skip to content

Copy local flakes to the store lazily #3121

@edolstra

Description

@edolstra

Currently flakes are evaluated from the Nix store, so when using a local flake, it's first copied to the store. This means that

$ cd /path/to/nixpkgs
$ nix build .#hello

is a lot slower than the non-flake alternative

$ nix build -f . hello

Ideally, we would copy the flake to the store only when its outPath attribute is evaluated. However, we also need to ensure that it's not possible to access untracked files (i.e. we need to check every file against git ls-files).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fetchingNetworking with the outside (non-Nix) world, input lockingflakessignificantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions