various: clean up 'meta = with lib; { ... }'#442787
Conversation
This commit was generated using: github.com:booxter/nix-clean_with-lib/fix-with-lib-in-meta@6540275
wolfgangwalther
left a comment
There was a problem hiding this comment.
I don't feel confident reviewing / approving this, because I can't come up with a way to verify the exclusion list - there could be other files that are just left broken. Unfortunately nix-env -qa doesn't recurse into everything. Also the script is quite complex and hard to verify - what scares me a bit is the part where a sanity check with nixfmt is run and the change reverted if that doesn't pass. This means the transformation is not perfect - which also means there could be bad transformations that don't show up as a syntax error.
Maybe @philiptaron feels more confident about this.
|
Here's a quick draft of a tiny first step of the approach I outlined on Matrix: technowledgy/refactor-tractor#14 Most of the code in there is glue and tests for the replacement. It's a rather simple treesitter query to replace only |
|
@wolfgangwalther thanks for this. I'll take a look if I can instead contribute some rules there. |
|
First stab at using Refactor Tractor for the same goal: |
|
Gonna pursue the same via refactor-tractor: technowledgy/refactor-tractor#15 |
This commit was generated using:
github.com:booxter/nix-clean_with-lib/fix-with-lib-in-meta@6540275
Some stats from one of the recent commit hashes:
The PR was specifically crafted to hit zero rebuilds to allow for mechanical validation. You can reproduce the patch using the generation script located here.
Note to reviewers: I'm sure this PR will clash with other patches. I am happy to refresh it when someone is ready to mechanically review the PR and merge it. Let me know!
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.