ovhcloud-mcp: add bin wrapper (upstream has no bin field)
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 9s
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 9s
The upstream package.json has no 'bin' field, so buildNpmPackage produced
no executable and the gateway could not spawn it ('No such file or
directory'). Add a makeWrapper that runs node dist/index.js.
This commit is contained in:
1 parent
377d7534ff
commit
017683f9e2
1 file changed
+12
@@ -2,6 +2,8 @@
|
|||||||
lib,
|
lib,
|
||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
makeWrapper,
|
||||||
|
nodejs,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
@@ -17,12 +19,22 @@ buildNpmPackage rec {
|
|||||||
|
|
||||||
npmDepsHash = "sha256-myeqksb3mjJ1GJej/4D7iuyOOTsGJBdkka9zUpH+flY=";
|
npmDepsHash = "sha256-myeqksb3mjJ1GJej/4D7iuyOOTsGJBdkka9zUpH+flY=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
cp ${./package-lock.json} package-lock.json
|
cp ${./package-lock.json} package-lock.json
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# dist/ is NOT committed to the repo; buildNpmPackage runs "npm run build"
|
# dist/ is NOT committed to the repo; buildNpmPackage runs "npm run build"
|
||||||
# (tsc) by default, which emits dist/index.js.
|
# (tsc) by default, which emits dist/index.js.
|
||||||
|
#
|
||||||
|
# The upstream package.json has NO "bin" field, so buildNpmPackage produces
|
||||||
|
# no executable. Create a wrapper that runs node dist/index.js.
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper ${nodejs}/bin/node $out/bin/ovhcloud-mcp \
|
||||||
|
--add-flags "$out/lib/node_modules/ovhcloud-mcp/dist/index.js"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "OVHcloud MCP server - VPS, domains, DNS, billing, SSH, and API explorer";
|
description = "OVHcloud MCP server - VPS, domains, DNS, billing, SSH, and API explorer";
|
||||||
|
|||||||
Reference in new issue
Block a user