assistant/mcphub-nvim: init

This commit is contained in:
Farouk Brown 2025-10-05 20:09:50 +01:00
commit bdd10b3918
9 changed files with 484 additions and 1 deletions

View file

@ -0,0 +1,25 @@
{
pins,
pkgs,
...
}: let
pin = pins.mcp-hub;
src = pkgs.fetchFromGitHub {
inherit (pin.repository) owner repo;
tag = pin.version;
sha256 = pin.hash;
};
inherit (pkgs) nodejs;
in
pkgs.buildNpmPackage {
pname = "mcp-hub";
inherit (pin) version;
inherit src nodejs;
nativeBuildInputs = [nodejs];
npmDeps = pkgs.importNpmLock {
npmRoot = src;
};
inherit (pkgs.importNpmLock) npmConfigHook;
}

View file

@ -0,0 +1,26 @@
{
pins,
vimUtils,
pkgs,
...
}: let
mcp-hub = import ./bin.nix {inherit pins pkgs;};
pin = pins.mcphub-nvim;
version = pin.branch;
src = pkgs.fetchFromGitHub {
inherit (pin.repository) owner repo;
rev = pin.revision;
sha256 = pin.hash;
};
in
vimUtils.buildVimPlugin {
pname = "mcphub-nvim";
inherit src version;
doCheck = false;
postInstall = ''
mkdir -p $out/bundled/mcp-hub/node_modules/.bin
ln -s ${mcp-hub}/bin/mcp-hub $out/bundled/mcp-hub/node_modules/.bin/mcp-hub
'';
}