Skip to content

Commit

Permalink
Merge pull request #260096 from teto/vimPluginsUpdater-fix
Browse files Browse the repository at this point in the history
vimPluginsUpdater: add missing nix-prefetch-git dependency
  • Loading branch information
figsoda authored Oct 11, 2023
2 parents 4cf896a + e8f9be5 commit d5f4343
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions pkgs/applications/editors/vim/plugins/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"# 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"


Expand Down Expand Up @@ -129,14 +129,15 @@ def update(self, args):
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"))])
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/editors/vim/plugins/updater.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, makeWrapper
, python3Packages
, lib
, nix-prefetch-git

# optional
, vimPlugins
Expand Down Expand Up @@ -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
'';

Expand Down
3 changes: 0 additions & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
};
Expand Down

0 comments on commit d5f4343

Please sign in to comment.