about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThilo Billerbeck <thilo.billerbeck@officerent.de>2023-05-23 14:41:53 +0200
committerThilo Billerbeck <thilo.billerbeck@officerent.de>2023-05-31 14:14:16 +0200
commit9afc4d4efb45ee0bb1089f68ac472bcaee8ec235 (patch)
treed7928fba574ba85f8c472a4583702571de7c7a7d
parentd30264c2691128adc261d7c9388033645f0e742b (diff)
pocketbase: 0.15.3 -> 0.16.3
updated pocketbase
-rw-r--r--pkgs/servers/pocketbase/default.nix13
-rw-r--r--pkgs/servers/pocketbase/remove-update-method.patch22
2 files changed, 31 insertions, 4 deletions
diff --git a/pkgs/servers/pocketbase/default.nix b/pkgs/servers/pocketbase/default.nix
index 462479745b876..fb0b0f0129551 100644
--- a/pkgs/servers/pocketbase/default.nix
+++ b/pkgs/servers/pocketbase/default.nix
@@ -5,16 +5,16 @@
 
 buildGoModule rec {
   pname = "pocketbase";
-  version = "0.15.3";
+  version = "0.16.3";
 
   src = fetchFromGitHub {
     owner = "pocketbase";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-9LIOBfNOa+u7yLL7iWb/e7c8ZSiyjukqaY0ifVR2iSs=";
+    sha256 = "sha256-AKKCd80gxeL2s1yFX3pjwgxn7UDbrrhFUkMWDDcrN0c=";
   };
 
-  vendorHash = "sha256-LFIJClPByaLXtsBOk7SjpJlIuQhWbVIs6H4PXhd7oyo=";
+  vendorHash = "sha256-J1vZn5x7wxM/UshcB+FdaiXiq4mZF7KvZxR5iPb37UQ=";
 
   # This is the released subpackage from upstream repo
   subPackages = [ "examples/base" ];
@@ -32,10 +32,15 @@ buildGoModule rec {
     mv $out/bin/base $out/bin/pocketbase
   '';
 
+  patches = [
+    # To provide a consistent update experience, we remove the built in update method
+    ./remove-update-method.patch
+  ];
+
   meta = with lib; {
     description = "Open Source realtime backend in 1 file";
     homepage = "https://github.com/pocketbase/pocketbase";
     license = licenses.mit;
-    maintainers = with maintainers; [ dit7ya ];
+    maintainers = with maintainers; [ dit7ya thilobillerbeck ];
   };
 }
diff --git a/pkgs/servers/pocketbase/remove-update-method.patch b/pkgs/servers/pocketbase/remove-update-method.patch
new file mode 100644
index 0000000000000..a68ae58bd0ba2
--- /dev/null
+++ b/pkgs/servers/pocketbase/remove-update-method.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/base/main.go b/examples/base/main.go
+index 908d31d..04b8f1d 100644
+--- a/examples/base/main.go
++++ b/examples/base/main.go
+@@ -10,7 +10,6 @@ import (
+ 	"github.com/pocketbase/pocketbase"
+ 	"github.com/pocketbase/pocketbase/apis"
+ 	"github.com/pocketbase/pocketbase/core"
+-	"github.com/pocketbase/pocketbase/plugins/ghupdate"
+ 	"github.com/pocketbase/pocketbase/plugins/jsvm"
+ 	"github.com/pocketbase/pocketbase/plugins/migratecmd"
+ )
+@@ -80,9 +79,6 @@ func main() {
+ 		Dir:          migrationsDir,
+ 	})
+ 
+-	// GitHub selfupdate
+-	ghupdate.MustRegister(app, app.RootCmd, nil)
+-
+ 	app.OnAfterBootstrap().Add(func(e *core.BootstrapEvent) error {
+ 		app.Dao().ModelQueryTimeout = time.Duration(queryTimeout) * time.Second
+ 		return nil