mirror of
https://github.com/openclaw/nix-openclaw.git
synced 2026-07-25 13:45:53 -04:00
Gateway: link hasown for form-data
- add hasown symlink workaround for form-data in pnpm layout - include docs/reference templates in install output Tests: not run (CI)
This commit is contained in:
@@ -7,6 +7,11 @@ if [ -d extensions ]; then
|
||||
cp -r extensions "$out/lib/openclaw/"
|
||||
fi
|
||||
|
||||
if [ -d docs/reference/templates ]; then
|
||||
mkdir -p "$out/lib/openclaw/docs/reference"
|
||||
cp -r docs/reference/templates "$out/lib/openclaw/docs/reference/"
|
||||
fi
|
||||
|
||||
if [ -z "${STDENV_SETUP:-}" ]; then
|
||||
echo "STDENV_SETUP is not set" >&2
|
||||
exit 1
|
||||
@@ -59,5 +64,21 @@ if [ -n "$combined_stream_src" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Work around missing hasown dependency for form-data in pnpm layout.
|
||||
hasown_src="$(find "$out/lib/openclaw/node_modules/.pnpm" -path "*/hasown@*/node_modules/hasown" -print | head -n 1)"
|
||||
if [ -n "$hasown_src" ]; then
|
||||
if [ ! -e "$out/lib/openclaw/node_modules/hasown" ]; then
|
||||
ln -s "$hasown_src" "$out/lib/openclaw/node_modules/hasown"
|
||||
fi
|
||||
if [ -n "$form_data_pkgs" ]; then
|
||||
for pkg in $form_data_pkgs; do
|
||||
if [ ! -e "$pkg/node_modules/hasown" ]; then
|
||||
mkdir -p "$pkg/node_modules"
|
||||
ln -s "$hasown_src" "$pkg/node_modules/hasown"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
bash -e -c '. "$STDENV_SETUP"; makeWrapper "$NODE_BIN" "$out/bin/openclaw" --add-flags "$out/lib/openclaw/dist/index.js" --set-default OPENCLAW_NIX_MODE "1" --set-default MOLTBOT_NIX_MODE "1" --set-default CLAWDBOT_NIX_MODE "1"'
|
||||
ln -s "$out/bin/openclaw" "$out/bin/moltbot"
|
||||
|
||||
Reference in New Issue
Block a user