Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim update.py: allow different in and out files #71798

Merged
merged 1 commit into from Nov 19, 2019
Merged

Conversation

teto
Copy link
Member

@teto teto commented Oct 23, 2019

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@Mic92
Copy link
Member

Mic92 commented Oct 23, 2019

Please re-format the file with black as well:

$ nix run nixpkgs.python3Packages.black -c black update.py

@teto
Copy link
Member Author

teto commented Oct 24, 2019

ran black on it and tested with the same command, worked fine.

@jonringer
Copy link
Contributor

do you mind squashing and changing the commit message to:

vim update.py: allow different in and out files

...also adds an argparse cli parser.
@teto
Copy link
Member Author

teto commented Nov 19, 2019

thanks for looking. done

@Mic92 Mic92 merged commit f82832e into NixOS:master Nov 19, 2019
@teto teto deleted the vim_update branch November 19, 2019 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants