feat(wrapperModules.hyfetch): init#419
Conversation
There was a problem hiding this comment.
It looks like hyfetch can write to its own config file.
We may want to give an explicit path option that allows them to point it out of the store at first if they wish.
We dont need to allow them to pass raw json file content, they can builtins.fromJSON, json doesnt append well anyway, so just the path is fine
| relPath = "${config.binName}-settings.json"; | ||
| content = builtins.toJSON config.settings; | ||
| }; | ||
| flags."--config-file" = config.constructFiles.generatedConfig.path; |
There was a problem hiding this comment.
| flags."--config-file" = config.constructFiles.generatedConfig.path; | |
| flags."--config-file" = config.configFile; |
There was a problem hiding this comment.
I pushed the changes. That's actually pretty cool, but it only works if i pass an absolute path as a string, is that right?
There was a problem hiding this comment.
You could
configFile = "~/wherever";Or if you wanted to take it a bit further:
flags."--config-file" = _: { esc-fn = x: x; };And then
configFile = "\"$HOME/wherever\"";But that only works when wrapperImplementation = "nix";, the default, in the other 2 backends, variables either expand at build time or are fully escaped, which would obviously make that not work.
0d57d39 to
ce4d245
Compare
ce4d245 to
dc9f1b4
Compare
No description provided.