Skip to content

fix apps.<system>.genflake.program under lazy-trees - #7

Open
ethernet8023 wants to merge 1 commit into
jorsn:mainfrom
ethernet8023:fix/lazy-trees-app-program
Open

fix apps.<system>.genflake.program under lazy-trees#7
ethernet8023 wants to merge 1 commit into
jorsn:mainfrom
ethernet8023:fix/lazy-trees-app-program

Conversation

@ethernet8023

Copy link
Copy Markdown

toPath ./genflake coerces a subpath of the flake source.

with the new lazy-tree feature, the source tree isn't realised in the store at eval time.
instead we get a virtual store path. that differs on every evaluation:

$ nix eval --raw '.#apps.aarch64-darwin.genflake.program'
/nix/store/bmwj8dj3vgrdsmm627vjdhl3aq06141c-source/genflake
$ nix eval --raw '.#apps.aarch64-darwin.genflake.program'
/nix/store/l38p4cvnczv37vd3d7hv296j2n1h8cfx-source/genflake

nix run then exec()s a path that was never materialised:

error: unable to execute '/nix/store/.../genflake': No such file or directory

instead, if we interpolate the self input, this forces realisation and gives a valid path, even under lazy-tree.

This also keeps the string type that #6 needed, so nix flake check --all-systems still passes.

with the new lazy-tree feature, the source tree isn't realised in the store at eval time.
instead we get a virtual store path. that differs on every evaluation:
```bash
$ nix eval --raw '.#apps.aarch64-darwin.genflake.program'
/nix/store/bmwj8dj3vgrdsmm627vjdhl3aq06141c-source/genflake
$ nix eval --raw '.#apps.aarch64-darwin.genflake.program'
/nix/store/l38p4cvnczv37vd3d7hv296j2n1h8cfx-source/genflake
```

nix run then exec()s a path that was never materialised:

  error: unable to execute '/nix/store/.../genflake': No such file or directory

instead, if we interpolate the self input, this forces realisation and gives a valid path, even under lazy-tree.

This also keeps the string type that jorsn#6 needed, so nix flake check --all-systems still passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant