about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam C. Stephens <2071575+adamcstephens@users.noreply.github.com>2024-03-28 17:38:15 -0400
committerGitHub <noreply@github.com>2024-03-28 17:38:15 -0400
commita0efbcae77fa7b7c47c30e594c5f575d6a9f80ca (patch)
treef8d9496db4853880d7fedc44da3ca49c49acad38
parent38482561f285382b5123034e51bba761ccb4bb05 (diff)
parent9fb68677e40ad2bfec0cc6cbdbecdf1523c9430a (diff)
downloadnixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar.gz
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar.bz2
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar.lz
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar.xz
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.tar.zst
nixlib-a0efbcae77fa7b7c47c30e594c5f575d6a9f80ca.zip
Merge pull request #299811 from emilylange/forgejo-static-root-path
forgejo: fix applying of our `STATIC_ROOT_PATH` patch
-rw-r--r--pkgs/applications/version-management/forgejo/default.nix4
-rw-r--r--pkgs/applications/version-management/forgejo/static-root-path.patch13
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/applications/version-management/forgejo/default.nix b/pkgs/applications/version-management/forgejo/default.nix
index d7098115dad8..0060dea785dd 100644
--- a/pkgs/applications/version-management/forgejo/default.nix
+++ b/pkgs/applications/version-management/forgejo/default.nix
@@ -59,11 +59,11 @@ buildGoModule rec {
   buildInputs = lib.optional pamSupport pam;
 
   patches = [
-    ./../gitea/static-root-path.patch
+    ./static-root-path.patch
   ];
 
   postPatch = ''
-    substituteInPlace modules/setting/setting.go --subst-var data
+    substituteInPlace modules/setting/server.go --subst-var data
   '';
 
   tags = lib.optional pamSupport "pam"
diff --git a/pkgs/applications/version-management/forgejo/static-root-path.patch b/pkgs/applications/version-management/forgejo/static-root-path.patch
new file mode 100644
index 000000000000..7f70329c6040
--- /dev/null
+++ b/pkgs/applications/version-management/forgejo/static-root-path.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/setting/server.go b/modules/setting/server.go
+index 183906268..fa02e8915 100644
+--- a/modules/setting/server.go
++++ b/modules/setting/server.go
+@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
+ 	OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
+ 	Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
+ 	if len(StaticRootPath) == 0 {
+-		StaticRootPath = AppWorkPath
++		StaticRootPath = "@data@"
+ 	}
+ 	StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
+ 	StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)