gokapi: apply patch to allow builds with go 1.24

This commit is contained in:
Darragh Elliott
2025-05-02 13:02:19 +01:00
parent de515c09c8
commit 11f6058b4f
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/build/go-generate/copyStaticFiles.go b/build/go-generate/copyStaticFiles.go
index 9f8a049..de21bdd 100644
--- a/build/go-generate/copyStaticFiles.go
+++ b/build/go-generate/copyStaticFiles.go
@@ -10,7 +10,7 @@ import (
)
func main() {
- copyFile(build.Default.GOROOT+"/misc/wasm/wasm_exec.js", "../../internal/webserver/web/static/js/wasm_exec.js")
+ copyFile(build.Default.GOROOT+"/lib/wasm/wasm_exec.js", "../../internal/webserver/web/static/js/wasm_exec.js")
copyFile("../../go.mod", "../../build/go.mod")
copyFile("../../openapi.json", "../../internal/webserver/web/static/apidocumentation/openapi.json")
}

View File

@@ -20,6 +20,10 @@ buildGoModule rec {
vendorHash = "sha256-9GRAlgng+yq7q0VQz374jIOCjeDIIDD631BglM/FsQQ=";
patches = [
./go-1.24.patch
];
# This is the go generate is ran in the upstream builder, but we have to run the components separately for things to work.
preBuild = ''
cd ./cmd/gokapi/