1
0

Try installing go
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 1m42s

This commit is contained in:
2026-03-16 16:52:58 +01:00
parent dc18e77382
commit 846a6b3e6d
2 changed files with 7 additions and 15 deletions

View File

@@ -15,20 +15,10 @@ fi
echo "Copying wasm_exec.js from Go SDK..."
GOROOT="$(go env GOROOT)"
GOPATH="$(go env GOPATH 2>/dev/null || echo "")"
WASM_EXEC=""
for dir in "$GOROOT" "$GOPATH" /usr/local/go; do
[ -z "$dir" ] && continue
[ -d "$dir" ] || continue
found="$(find "$dir" -name "wasm_exec.js" 2>/dev/null | head -1)" || true
if [ -n "$found" ]; then
WASM_EXEC="$found"
break
fi
done
if [ -n "$WASM_EXEC" ]; then
echo "Found wasm_exec.js at: $WASM_EXEC"
cp "$WASM_EXEC" "$SCRIPT_DIR/wasm_exec.js"
if [ -f "$GOROOT/lib/wasm/wasm_exec.js" ]; then
cp "$GOROOT/lib/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
elif [ -f "$GOROOT/misc/wasm/wasm_exec.js" ]; then
cp "$GOROOT/misc/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
else
echo "Error: could not find wasm_exec.js in Go SDK"
echo "GOROOT=$GOROOT"

View File

@@ -1,8 +1,10 @@
providers = ["python"]
[phases.setup]
nixPkgs = ["go", "git", "python3Minimal"]
nixPkgs = ["git", "curl", "python3Minimal"]
paths = ["/usr/local/go/bin"]
cmds = [
"curl -sSfL https://go.dev/dl/go1.23.12.linux-amd64.tar.gz | tar -xz -C /usr/local",
"cd kobopatch-wasm && bash setup.sh",
"cd kobopatch-wasm && bash build.sh",
]