Commit f3343f75 authored by Nova Hahn's avatar Nova Hahn
Browse files

texstudio: disable auto update

Disable auto update by applying the patch from Debian. From its
description:

> This patch sets the auto update configuration value to false by
> default and disables the update checkbox, the corresponding time
> interval, the "Check Now" button and the update level.

The program ignores any auto update settings already present in the
config, so this patch works as expected even if Texstudio was already
installed.
parent 2e03ab6f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  stdenv,
  lib,
  fetchFromGitHub,
  fetchpatch2,
  cmake,
  qt6,
  qt6Packages,
@@ -40,6 +41,14 @@ stdenv.mkDerivation (finalAttrs: {
    qt6.qtwayland
  ];

  patches = [
    (fetchpatch2 {
      name = "disable-auto-update.patch";
      url = "https://sources.debian.org/data/main/t/texstudio/4.9.1%2Bds-1/debian/patches/0004-disable-auto-update.patch";
      hash = "sha256-w4/u8ObJSQqHisZmxMSpJeveE+DJSgLqnfpEnizHsBg=";
    })
  ];

  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
    mkdir -p "$out/Applications"
    mv "$out/bin/texstudio.app" "$out/Applications"