From e8b7dc9c267c8123d0b053616d4bcf3a3ead6b42 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Fri, 19 Jan 2024 08:59:01 +0100 Subject: [PATCH] vesktop: add disable update checking patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../by-name/ve/vesktop/disable_update_checking.patch | 12 ++++++++++++ pkgs/by-name/ve/vesktop/package.nix | 1 + 2 files changed, 13 insertions(+) create mode 100644 pkgs/by-name/ve/vesktop/disable_update_checking.patch diff --git a/pkgs/by-name/ve/vesktop/disable_update_checking.patch b/pkgs/by-name/ve/vesktop/disable_update_checking.patch new file mode 100644 index 000000000000..590951b675c0 --- /dev/null +++ b/pkgs/by-name/ve/vesktop/disable_update_checking.patch @@ -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 { diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix index 88b57273d3ee..3882a23a5a15 100644 --- a/pkgs/by-name/ve/vesktop/package.nix +++ b/pkgs/by-name/ve/vesktop/package.nix @@ -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;