mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
gokapi: apply patch to allow builds with go 1.24
This commit is contained in:
13
pkgs/by-name/go/gokapi/go-1.24.patch
Normal file
13
pkgs/by-name/go/gokapi/go-1.24.patch
Normal 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")
|
||||
}
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user