From a449d3b4d4a0b807fde454c3ff191a62a5a97363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Sun, 5 Apr 2026 03:11:11 +0200 Subject: [PATCH 1/2] openclaw: 2026.3.12 -> 2026.4.2 --- pkgs/by-name/op/openclaw/package.nix | 34 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/op/openclaw/package.nix b/pkgs/by-name/op/openclaw/package.nix index be4bdb77df9a..67be05f3f6d8 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.3.12", + version ? "2026.4.2", }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "openclaw"; @@ -21,10 +21,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { owner = "openclaw"; repo = "openclaw"; tag = "v${finalAttrs.version}"; - hash = "sha256-dGKfXkC7vHflGbg+SkgSMfM5LW8w1YQIWicgp3BKDQ8="; + hash = "sha256-wVS2OuBNrF1yWjmINxde0kC5mvY2QUUtwYpYrZcARkI="; }; - pnpmDepsHash = "sha256-GHTkpwOj2Y29YUcS/kbZlCdo9DL8C3WW3WHe0PMIN/M="; + pnpmDepsHash = "sha256-aHepSWiQ4+UyjPHBF+4+M9/nFrgfCw422q671saJM+U="; pnpmDeps = fetchPnpmDeps { inherit (finalAttrs) pname version src; @@ -43,18 +43,25 @@ stdenvNoCC.mkDerivation (finalAttrs: { installShellFiles ]; - preBuild = '' - rm -rf node_modules/rolldown node_modules/@rolldown/pluginutils - mkdir -p node_modules/@rolldown - cp -r ${rolldown}/lib/node_modules/rolldown node_modules/rolldown - cp -r ${rolldown}/lib/node_modules/@rolldown/pluginutils node_modules/@rolldown/pluginutils - chmod -R u+w node_modules/rolldown node_modules/@rolldown/pluginutils - ''; - buildPhase = '' runHook preBuild pnpm install --frozen-lockfile + + # Replace pnpm-installed rolldown with the Nix-built version + rm -rf node_modules/rolldown node_modules/@rolldown/pluginutils + mkdir -p node_modules/@rolldown node_modules/.pnpm/node_modules/@rolldown + cp -r ${rolldown}/lib/node_modules/rolldown node_modules/rolldown + cp -r ${rolldown}/lib/node_modules/@rolldown/pluginutils node_modules/@rolldown/pluginutils + cp -r ${rolldown}/lib/node_modules/rolldown node_modules/.pnpm/node_modules/rolldown + cp -r ${rolldown}/lib/node_modules/@rolldown/pluginutils node_modules/.pnpm/node_modules/@rolldown/pluginutils + 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. Patch the staging + # script to accept version-mismatched deps from root node_modules + # instead of falling back to npm install. + sed -i 's/if (installedVersion === null || !dependencyVersionSatisfied(spec, installedVersion)) {/if (installedVersion === null) {/' scripts/stage-bundled-plugin-runtime-deps.mjs pnpm build pnpm ui:build @@ -69,12 +76,15 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp --reflink=auto -r package.json dist node_modules $libdir/ - cp --reflink=auto -r assets docs skills patches extensions $libdir/ 2>/dev/null || true + cp --reflink=auto -r assets docs skills patches extensions $libdir/ rm -f $libdir/node_modules/.pnpm/node_modules/clawdbot \ $libdir/node_modules/.pnpm/node_modules/moltbot \ $libdir/node_modules/.pnpm/node_modules/openclaw-control-ui + # Remove broken symlinks created by pnpm workspace linking in extensions + find $libdir/extensions -xtype l -delete + makeWrapper ${lib.getExe nodejs_22} $out/bin/openclaw \ --add-flags "$libdir/dist/index.js" \ --set NODE_PATH "$libdir/node_modules" From b39e70ae6f2b87104cd8b27d1e8cc206b63cfd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Sun, 5 Apr 2026 11:53:56 +0200 Subject: [PATCH 2/2] openclaw: add myself as maintainer --- pkgs/by-name/op/openclaw/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openclaw/package.nix b/pkgs/by-name/op/openclaw/package.nix index 67be05f3f6d8..0f86c4ec9fb5 100644 --- a/pkgs/by-name/op/openclaw/package.nix +++ b/pkgs/by-name/op/openclaw/package.nix @@ -128,7 +128,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { changelog = "https://github.com/openclaw/openclaw/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; mainProgram = "openclaw"; - maintainers = with lib.maintainers; [ chrisportela ]; + maintainers = with lib.maintainers; [ + chrisportela + mkg20001 + ]; platforms = with lib.platforms; linux ++ darwin; knownVulnerabilities = [ "Project uses LLMs to parse untrusted content, making it vulnerable to prompt injection, while having full access to system by default."