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
Contributor

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

This comment has been minimized.

Copy link
Contributor

Mic92 commented Oct 23, 2019

Please re-format the file with black as well:

$ nix run nixpkgs.python3Packages.black -c black update.py
pkgs/misc/vim-plugins/update.py Outdated Show resolved Hide resolved
@teto

This comment has been minimized.

Copy link
Contributor Author

teto commented Oct 24, 2019

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

@teto teto force-pushed the teto:vim_update branch from 3c4a6c3 to 585ca5f Nov 18, 2019
@teto teto requested a review from jonringer as a code owner Nov 18, 2019
@jonringer

This comment has been minimized.

Copy link
Contributor

jonringer commented Nov 18, 2019

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 teto force-pushed the teto:vim_update branch from 585ca5f to 3820ff9 Nov 19, 2019
@teto

This comment has been minimized.

Copy link
Contributor Author

teto commented Nov 19, 2019

thanks for looking. done

@Mic92 Mic92 merged commit f82832e into NixOS:master Nov 19, 2019
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@teto teto deleted the teto:vim_update branch Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.