forked from NixOS/nix
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to access the parent flake from a subflake (using builtins.getFlake), an error is printed claiming that a random nix store path does not exist (it does not exist on the filesystem). However this error only occurs when lazy-trees is enabled, when it is disabled this works fine.
This issue was reproduced using DetSys nix 3.14.0
Steps To Reproduce
- Clone this repository: https://github.com/GrahamDennis/nix-lazy-trees-error
- In the
subflakedirectory, runnix eval --option lazy-trees true .#parentFlake.fooand an error is returned
error:
β¦ while calling the 'getFlake' builtin
at /.../github.com/GrahamDennis/nix-lazy-trees-error/subflake/flake.nix:3:110:
2| outputs = { self, ... }: {
3| parentFlake = let attrs = { type = "path"; path = self.sourceInfo.outPath; narHash = self.narHash; }; in builtins.deepSeq attrs builtins.getFlake (builtins.flakeRefToString attrs);
| ^
4| };
β¦ while fetching the input 'path:/nix/store/kaf54rwjinjzi6w4fx4ap0nxy7b7zhjy-source?narHash=sha256-GHxO7WMR2ut8ZWLs7wWYExrKOxp4Aa58V%2Bq3krEA4l4%3D'
error: path '//nix/store/kaf54rwjinjzi6w4fx4ap0nxy7b7zhjy-source' does not exist
(this is also described in the README for the repo)
Expected behavior
- Clone this repository: https://github.com/GrahamDennis/nix-lazy-trees-error
- In the
subflakedirectory, runnix eval --option lazy-trees false .#parentFlake.fooand the result"bar"is printed.
Metadata
nix --version
nix (Determinate Nix 3.14.0) 2.32.4
Additional context
Checklist
- checked latest Determinate Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
coderabbitai
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working