vesktop: add disable update checking patch

As discussed in [NixOS/nixpkgs#281669](https://github.com/NixOS/nixpkgs/pull/281669#issuecomment-1899451746), it might be more beneficial to disable the update checker
and prevent the users from being annoyed to update to a version that's
not yet built in Nixpkgs.

A builtin option for disabling the update checker does exist, however
it's buried very deeply within Vesktop settings and normal users may not
ever be aware of its existence — better to do it in Nixpkgs itself
This commit is contained in:
Leah Amelia Chen 2024-01-19 08:59:01 +01:00
parent b956688fd1
commit e8b7dc9c26
No known key found for this signature in database
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff --git a/src/updater/main.ts b/src/updater/main.ts
index 059afb9..274802e 100644
--- a/src/updater/main.ts
+++ b/src/updater/main.ts
@@ -77,6 +77,7 @@ function isOutdated(oldVersion: string, newVersion: string) {
}
export async function checkUpdates() {
+ return;
if (Settings.store.checkUpdates === false) return;
try {

View File

@ -87,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
(substituteAll { inherit vencord; src = ./use_system_vencord.patch; })
./disable_update_checking.patch
];
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;