diff --git a/pkgs/by-name/op/openclaw/package.nix b/pkgs/by-name/op/openclaw/package.nix index 4a817f26827e..c1c5460b3f7c 100644 --- a/pkgs/by-name/op/openclaw/package.nix +++ b/pkgs/by-name/op/openclaw/package.nix @@ -11,7 +11,7 @@ versionCheckHook, rolldown, installShellFiles, - version ? "2026.4.22", + version ? "2026.5.6", }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "openclaw"; @@ -21,10 +21,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "openclaw"; repo = "openclaw"; tag = "v${finalAttrs.version}"; - hash = "sha256-BB+stGBDgMRAPHrVWJS2dFRjw2WrVrFdVf/23Tq1UeA="; + hash = "sha256-svziVePavoMxEUQAaNkv+67tSUOywblefmeTWtmKo9Y="; }; - pnpmDepsHash = "sha256-z45mB/w7sorAE3CTliDpvMm9eq+/l9L/mmhYJt0t9O4="; + pnpmDepsHash = "sha256-kz9vE1A/GTkw/HH2ts4hxTJzrdkYhiLaJQP0AeAS3Bo="; pnpmDeps = fetchPnpmDeps { inherit (finalAttrs) pname version src; @@ -58,45 +58,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { chmod -R u+w node_modules/rolldown node_modules/@rolldown/pluginutils \ node_modules/.pnpm/node_modules/rolldown node_modules/.pnpm/node_modules/@rolldown/pluginutils - # In Nix sandbox, npm install has no network access. - # 1) Skip missing/mismatched deps in closure walk instead of aborting. - # 2) Never fall through to the npm-install path. - substituteInPlace scripts/stage-bundled-plugin-runtime-deps.mjs \ - --replace-fail \ - 'if (installedVersion === null || !dependencyVersionSatisfied(spec, installedVersion)) { - return null; - }' \ - 'if (installedVersion === null || !dependencyVersionSatisfied(spec, installedVersion)) { - continue; - }' \ - --replace-fail \ - ' if ( - stageInstalledRootRuntimeDeps({ - directDependencyPackageRoot, - fingerprint, - packageJson, - pluginDir, - pruneConfig, - repoRoot, - stampPath, - }) - ) { - continue; - }' \ - ' if ( - stageInstalledRootRuntimeDeps({ - directDependencyPackageRoot, - fingerprint, - packageJson, - pluginDir, - pruneConfig, - repoRoot, - stampPath, - }) - ) { - continue; - } - continue; // nix: sandbox has no npm' pnpm build pnpm ui:build @@ -111,7 +72,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp --reflink=auto -r package.json dist node_modules $libdir/ - cp --reflink=auto -r assets docs skills patches extensions qa $libdir/ + cp --reflink=auto -r docs skills patches extensions qa $libdir/ rm -f $libdir/node_modules/.pnpm/node_modules/clawdbot \ $libdir/node_modules/.pnpm/node_modules/moltbot \ @@ -137,9 +98,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { in '' installShellCompletion --cmd openclaw \ - --bash <(OPENCLAW_SKIP_PLUGIN_CLI=1 ${emulator} $out/bin/openclaw completion --shell bash) \ - --fish <(OPENCLAW_SKIP_PLUGIN_CLI=1 ${emulator} $out/bin/openclaw completion --shell fish) \ - --zsh <(OPENCLAW_SKIP_PLUGIN_CLI=1 ${emulator} $out/bin/openclaw completion --shell zsh) + --bash <(${emulator} $out/bin/openclaw completion --shell bash) \ + --fish <(${emulator} $out/bin/openclaw completion --shell fish) \ + --zsh <(${emulator} $out/bin/openclaw completion --shell zsh) '' ); @@ -148,10 +109,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { passthru.updateScript = ./update.sh; - patches = [ - ./skip-bundled-runtime-install.patch - ]; - meta = { description = "Self-hosted, open-source AI assistant/agent"; longDescription = '' diff --git a/pkgs/by-name/op/openclaw/skip-bundled-runtime-install.patch b/pkgs/by-name/op/openclaw/skip-bundled-runtime-install.patch deleted file mode 100644 index 539ba54d20c5..000000000000 --- a/pkgs/by-name/op/openclaw/skip-bundled-runtime-install.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/plugins/bundled-runtime-deps.ts b/src/plugins/bundled-runtime-deps.ts -index 5dca7aa..fac598b 100644 ---- a/src/plugins/bundled-runtime-deps.ts -+++ b/src/plugins/bundled-runtime-deps.ts -@@ -823,6 +823,12 @@ export function installBundledRuntimeDeps(params: { - missingSpecs: string[]; - env: NodeJS.ProcessEnv; - }): void { -+ // Refuse to spawn `npm install` in environments that opt out (e.g. the Nix -+ // build sandbox). Bundled runtime deps are expected to already be staged by -+ // the package build; a runtime install would require network access. -+ if (params.env.OPENCLAW_SKIP_PLUGIN_CLI === "1") { -+ throw new Error("bundled runtime deps install skipped (OPENCLAW_SKIP_PLUGIN_CLI=1)"); -+ } - const installExecutionRoot = params.installExecutionRoot ?? params.installRoot; - fs.mkdirSync(params.installRoot, { recursive: true }); - fs.mkdirSync(installExecutionRoot, { recursive: true });