treewide: generate JSON instead of Nix#3832
Conversation
| # Get file part from filepath and remove hash prefix | ||
| output_name=$(basename "$1" | cut -d "-" -f "2-") | ||
| basename "$1" ".json" | ||
| prettier "$1" > "$generated_dir/$output_name" |
There was a problem hiding this comment.
Aside: directly calling prettier in the update-script probably isn't the best design. Really, we should be using our treefmt configuration, so that we also get any settings (etc). But doing that without having to evaluate the rest of nixvim's flake may be non-trivial.
There was a problem hiding this comment.
I agree but out of scope for this PR. Though in practice our treefmt prettier is the same as this one for JSON files but of course this would help keep it in sync in the future.
MattSturgeon
left a comment
There was a problem hiding this comment.
We should avoid taking pkgs as an argument in callPackage functions.
Signed-off-by: saygo-png <saygo.mail@proton.me>
Sounds like buildbot is rebooting |
Yes, sorry. I'll re-queue this PR. |
#3682 (comment)
It also cleans up the generate script a bit so we no longer have to repeat the name and the files always have the .json extension even in the nix derivation.
Didn't touch the maintainers script because I can't nor want to read Python.