nixpkgs/pkgs/applications/version-management/gitea/static-root-path.patch
Maximilian Bosch cbceee8e97
gitea: 1.10.3 -> 1.11.3
Updates `gitea` to the latest version available[1]. Also ensured that
upgrading from `gitea-1.9` (used on NixOS 19.09) to `1.11.3` works
seamlessly.

The derivation required a few more changes this time since `gitea` uses
`npm` now to build the frontend[2]. When using the default tarball from
GitHub, we'd have to build the frontend manually. By fetching a custom
tarball published on every release, we get a prebuilt frontend
(as it was the case on previous versions) and build the backend only from
source.

Co-authored-by: kolaente <k@knt.li>
Closes #80175

[1] https://github.com/go-gitea/gitea/releases/tag/v1.11.3
[2] https://github.com/go-gitea/gitea/issues/10253
2020-03-20 22:58:19 +01:00

13 lines
735 B
Diff

diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 714015c47..a2f85337e 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -641,7 +641,7 @@ func NewContext() {
PortToRedirect = sec.Key("PORT_TO_REDIRECT").MustString("80")
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
- StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(AppWorkPath)
+ StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString("@data@")
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
AppDataPath = sec.Key("APP_DATA_PATH").MustString(path.Join(AppWorkPath, "data"))
EnableGzip = sec.Key("ENABLE_GZIP").MustBool()