typst: fix high cpu load when using `typst watch` (#385509)

authored by

Pol Dellaiera and committed by
GitHub
1c7a7ece d1192949

+11
+11
pkgs/by-name/ty/typst/package.nix
··· 2 2 lib, 3 3 rustPlatform, 4 4 fetchFromGitHub, 5 + fetchpatch, 5 6 installShellFiles, 6 7 pkg-config, 7 8 openssl, ··· 23 24 24 25 useFetchCargoVendor = true; 25 26 cargoHash = "sha256-ey5pFGLgj17+RZGjpLOeN7Weh29jJyvuRrJ8wsIlC58="; 27 + 28 + patches = [ 29 + (fetchpatch { 30 + # typst 0.13.0 has a regression regarding usage of inotify when running `typst watch` 31 + # also affects NixOS: https://github.com/typst/typst/issues/5903#issuecomment-2680985045 32 + name = "fix-high-cpu-in-watch-mode.patch"; 33 + url = "https://patch-diff.githubusercontent.com/raw/typst/typst/pull/5905.patch"; 34 + hash = "sha256-qq5Dj5kKSjdlHp8FOH+gQtzZGqzBscvG8ufSrL94tsY="; 35 + }) 36 + ]; 26 37 27 38 nativeBuildInputs = [ 28 39 installShellFiles