openclaw: 2026.4.21 -> 2026.4.22 (#513099)

This commit is contained in:
Maciej Krüger
2026-05-04 15:55:21 +00:00
committed by GitHub
2 changed files with 29 additions and 6 deletions
+12 -6
View File
@@ -11,7 +11,7 @@
versionCheckHook,
rolldown,
installShellFiles,
version ? "2026.4.21",
version ? "2026.4.22",
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "openclaw";
@@ -21,10 +21,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
owner = "openclaw";
repo = "openclaw";
tag = "v${finalAttrs.version}";
hash = "sha256-K1Pl9lXzGKfoq/fXWxYX5PoY3IBzJr0PPstUDGET/gs=";
hash = "sha256-BB+stGBDgMRAPHrVWJS2dFRjw2WrVrFdVf/23Tq1UeA=";
};
pnpmDepsHash = "sha256-FDajXHs4s0+QDRPq4ZxQWWW9rqeSJVYACAl/5Mw2Agc=";
pnpmDepsHash = "sha256-z45mB/w7sorAE3CTliDpvMm9eq+/l9L/mmhYJt0t9O4=";
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
@@ -78,6 +78,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
pluginDir,
pruneConfig,
repoRoot,
stampPath,
})
) {
continue;
@@ -90,6 +91,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
pluginDir,
pruneConfig,
repoRoot,
stampPath,
})
) {
continue;
@@ -135,9 +137,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
in
''
installShellCompletion --cmd openclaw \
--bash <(${emulator} $out/bin/openclaw completion --shell bash) \
--fish <(${emulator} $out/bin/openclaw completion --shell fish) \
--zsh <(${emulator} $out/bin/openclaw completion --shell zsh)
--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)
''
);
@@ -146,6 +148,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
passthru.updateScript = ./update.sh;
patches = [
./skip-bundled-runtime-install.patch
];
meta = {
description = "Self-hosted, open-source AI assistant/agent";
longDescription = ''
@@ -0,0 +1,17 @@
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 });