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.
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
nodejs,
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "ovhcloud-mcp";
|
|
version = "2.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hlebtkachenko";
|
|
repo = "ovhcloud-mcp";
|
|
rev = "ccadc85bd4aab35434a24732bc77ef2b6f100b4c";
|
|
hash = "sha256-FYJSKOU/lCutGCUJhaAtKWBLJOBUyWvdkSnMWbxwhI4=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-myeqksb3mjJ1GJej/4D7iuyOOTsGJBdkka9zUpH+flY=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postPatch = ''
|
|
cp ${./package-lock.json} package-lock.json
|
|
'';
|
|
|
|
# dist/ is NOT committed to the repo; buildNpmPackage runs "npm run build"
|
|
# (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; {
|
|
description = "OVHcloud MCP server - VPS, domains, DNS, billing, SSH, and API explorer";
|
|
homepage = "https://github.com/hlebtkachenko/ovhcloud-mcp";
|
|
license = licenses.mit;
|
|
mainProgram = "ovhcloud-mcp";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|