gogs: patch gogs to include default STATIC_ROOT_PATH
This commit is contained in:
parent
9d841295f3
commit
41c2fb3f25
|
@ -16,9 +16,12 @@ buildGoPackage rec {
|
||||||
sha256 = "1xn1b4dxf7r8kagps3yvp31zskfxn50k1gfic9abl4kjwpwk78c0";
|
sha256 = "1xn1b4dxf7r8kagps3yvp31zskfxn50k1gfic9abl4kjwpwk78c0";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patches = [ ./static-root-path.patch ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
'';
|
substituteInPlace pkg/setting/setting.go --subst-var data
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go
|
||||||
|
index f206592d..796da6ef 100644
|
||||||
|
--- a/pkg/setting/setting.go
|
||||||
|
+++ b/pkg/setting/setting.go
|
||||||
|
@@ -474,7 +474,7 @@ func NewContext() {
|
||||||
|
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HTTPPort + "/")
|
||||||
|
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||||
|
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||||
|
- StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
|
||||||
|
+ StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString("@data@")
|
||||||
|
AppDataPath = sec.Key("APP_DATA_PATH").MustString("data")
|
||||||
|
EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
|
||||||
|
|
Loading…
Reference in New Issue