vim: update the updaters!

update.py and its companion update-shell.nix need to know where they are, else
they can't find the root default.nix of Nixpkgs. Because of this, I further
added a small piece of documentation about those path-dependent pieces of code.
This commit is contained in:
AndersonTorres 2022-02-17 03:56:44 -03:00
parent b71ebb32ce
commit b2a83e3c95
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,6 @@
{ pkgs ? import ../../.. { } }:
{ pkgs ? import ../../../../.. { } }:
# Ideally, pkgs points to default.nix file of Nixpkgs official tree
with pkgs;
let
pyEnv = python3.withPackages (ps: [ ps.GitPython ]);

View file

@ -13,6 +13,9 @@
# refer to:
#
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/vim.section.md#updating-plugins-in-nixpkgs-updating-plugins-in-nixpkgs
#
# (or the equivalent file /doc/languages-frameworks/vim.section.md from Nixpkgs master tree).
#
import inspect
import os
@ -27,7 +30,8 @@ log.addHandler(logging.StreamHandler())
# Import plugin update library from maintainers/scripts/pluginupdate.py
ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
sys.path.insert(0, os.path.join(ROOT.parent.parent.parent, "maintainers", "scripts"))
# Ideally, ROOT.(parent^5) points to root of Nixpkgs official tree
sys.path.insert(0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts"))
import pluginupdate
GET_PLUGINS = f"""(with import <localpkgs> {{}};