mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
Merge pull request #260096 from teto/vimPluginsUpdater-fix
vimPluginsUpdater: add missing nix-prefetch-git dependency
This commit is contained in:
commit
d5f43438f9
@ -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"))])
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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 ;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user