Merge pull request #260096 from teto/vimPluginsUpdater-fix

vimPluginsUpdater: add missing nix-prefetch-git dependency
This commit is contained in:
figsoda 2023-10-11 09:12:09 -04:00 committed by GitHub
commit d5f43438f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -46,7 +46,7 @@ HEADER = (
"# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
)
NVIM_TREESITTER_GENERATED_NIX = \
NIXPKGS_NVIMTREESITTER_FOLDER = \
"pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix"
@ -129,14 +129,15 @@ class VimEditor(pluginupdate.Editor):
if self.nvim_treesitter_updated:
print("updating nvim-treesitter grammars")
nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter")
lockfile = json.load(open(args.nixpkgs.join(NVIM_TREESITTER_GENERATED_FILE, "lockfile.json")))
lockfile = os.path.join(args.nixpkgs.join(NIXPKGS_NVIMTREESITTER_FOLDER, "lockfile.json"))
lockfile = json.load(open(lockfile))
nvim_treesitter.update_grammars(lockfile)
if self.nixpkgs_repo:
index = self.nixpkgs_repo.index
for diff in index.diff(None):
if diff.a_path == NVIM_TREESITTER_GENERATED_NIX:
if diff.a_path == f"{NIXPKGS_NVIMTREESITTER_FOLDER}/generated.nix":
msg = "vimPlugins.nvim-treesitter: update grammars"
print(f"committing to nixpkgs: {msg}")
index.add([str(nvim_treesitter_dir.joinpath("generated.nix"))])

View File

@ -3,6 +3,7 @@
, makeWrapper
, python3Packages
, lib
, nix-prefetch-git
# optional
, vimPlugins
@ -38,7 +39,7 @@ buildPythonApplication {
cp ${../../../../../maintainers/scripts/pluginupdate.py} $out/lib/pluginupdate.py
# wrap python scripts
makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [ nix my_neovim ]}" --prefix PYTHONPATH : "$out/lib" )
makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [ nix nix-prefetch-git my_neovim ]}" --prefix PYTHONPATH : "$out/lib" )
wrapPythonPrograms
'';

View File

@ -126,9 +126,6 @@ with pkgs;
common-updater-scripts = callPackage ../common-updater/scripts.nix { };
# vimPluginsUpdater = callPackage ../applications/editors/vim/plugins/updater.nix {
# inherit (writers) writePython3Bin;
# };
vimPluginsUpdater = callPackage ../applications/editors/vim/plugins/updater.nix {
inherit (python3Packages) buildPythonApplication ;
};