mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-09 06:55:30 +00:00
assistant/mcphub-nvim: init
This commit is contained in:
parent
e48638aef3
commit
bdd10b3918
9 changed files with 484 additions and 1 deletions
25
flake/pkgs/by-name/mcphub-nvim/bin.nix
Normal file
25
flake/pkgs/by-name/mcphub-nvim/bin.nix
Normal 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;
|
||||
}
|
||||
26
flake/pkgs/by-name/mcphub-nvim/package.nix
Normal file
26
flake/pkgs/by-name/mcphub-nvim/package.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue