templates icon indicating copy to clipboard operation
templates copied to clipboard

Template paths need to be nix store paths

Open aaronmondal opened this issue 2 years ago • 0 comments

According to the flake output schema docs the template path argument needs to be a nix store path. CI using something like

nix --store ~/nix flake check -L

would currently fail because the paths are relative. This is not noticeable without the --store flag on an empty nix store, because the paths in local git repos will already be on the users local /nix/store path. I think the solution here is to convert all template directories to implicit derivations by using something like this:

- path = ./mytemplate;
+ path = "${./mytemplate}";

@domenkozar I think this is is also an issue in the devenv repo and probably in many other repos as well. We noticed this because our CI for https://github.com/eomii/rules_ll/pull/65 failed. Before I start sending PRs everywhere, is my proposed solution correct or am I missing something?

cc @jaroeichler

aaronmondal avatar Apr 10 '23 20:04 aaronmondal