vim update.py: allow different in and out files #71798
Merged
+42
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
I've got some extra vim plugins in my nixpkgs fork (that I haven't upstreamed for different reasons, not fixed, personal etc). When rebasing it often generates conflicts, so I end up using upstream generated.nix and at the end of the rebase call ./pkgs/misc/vim-plugins/update.py .
It can be boring to do so I would like to move this kind of personal list to an overlay.
I modified ./pkgs/misc/vim-plugins/update.py to accept optional input list and output file.
For instance
./pkgs/misc/vim-plugins/update.py -i ~/dotfiles/config/nixpkgs/overlays/vim-plugins-names -o toto.nix
One issue is that I am not sure how to import these in my overlay. It would be nice if generated.nix could be implemented as an overlay so that the same update.py can generate code for nixpkgs and user overlays.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @