mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
gokapi: 1.9.6 -> 2.0.0 (#412670)
This commit is contained in:
commit
35d03da49b
2 changed files with 12 additions and 22 deletions
|
@ -1,13 +0,0 @@
|
|||
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")
|
||||
}
|
|
@ -9,30 +9,33 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "gokapi";
|
||||
version = "1.9.6";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Forceu";
|
||||
repo = "Gokapi";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-RDEvKh3tUun7wt1nhtCim95wEN9V9RlztZ9zcw9nS1o=";
|
||||
hash = "sha256-YhUHi1tR2bCFskBbAlFekuFzfZ2ER9G+TNCcfh5loS4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-9GRAlgng+yq7q0VQz374jIOCjeDIIDD631BglM/FsQQ=";
|
||||
vendorHash = "sha256-GeS+lfFw7jUuXX1qQPiu9eKjz6nswpRtbZXjqu4DnHg=";
|
||||
|
||||
patches = [
|
||||
./go-1.24.patch
|
||||
];
|
||||
patches = [ ];
|
||||
|
||||
# This is the go generate is ran in the upstream builder, but we have to run the components separately for things to work.
|
||||
preBuild = ''
|
||||
# Some steps expect GOROOT to be set.
|
||||
export GOROOT="$(go env GOROOT)"
|
||||
# Go generate runs from this working dir upstream
|
||||
cd ./cmd/gokapi/
|
||||
go run ../../build/go-generate/updateVersionNumbers.go
|
||||
# Tries to download "golang.org/x/exp/slices"
|
||||
# Tries to download "golang.org/x/exp/slices", and fails
|
||||
# go run ../../build/go-generate/updateProtectedUrls.go
|
||||
go run ../../build/go-generate/buildWasm.go
|
||||
# Must be specify go root to import wasm_exec.js
|
||||
GOROOT="$(go env GOROOT)" go run "../../build/go-generate/copyStaticFiles.go"
|
||||
go run ../../build/go-generate/copyStaticFiles.go
|
||||
# Attempts to download program to minify content, and fails
|
||||
# go run ../../build/go-generate/minifyStaticContent.go
|
||||
go run ../../build/go-generate/updateApiRouting.go
|
||||
cd ../..
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue