Skip to content

Commit

Permalink
nixpkgs: patch mautrix-telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
rebmit committed Jan 13, 2025
1 parent 06c6e1c commit 0f462a2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flake/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ let
inputs.nixpkgs-terraform-providers-bin.overlay

(_final: prev: {
mautrix-telegram = prev.mautrix-telegram.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
../patches/mautrix-telegram-sticker.patch
];
});
libadwaita = prev.libadwaita.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
../patches/libadwaita-without-adwaita-theme.patch
Expand Down
24 changes: 24 additions & 0 deletions patches/mautrix-telegram-sticker.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/mautrix_telegram/util/webm_converter.py b/mautrix_telegram/util/webm_converter.py
index 6ba4eed0..33d04514 100644
--- a/mautrix_telegram/util/webm_converter.py
+++ b/mautrix_telegram/util/webm_converter.py
@@ -26,13 +26,17 @@

converter_args = {
"gif": {
+ "input_args": ("-c:v", "libvpx-vp9"),
"output_args": ("-vf", "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse"),
},
"png": {
- "input_args": ("-ss", "0"),
+ "input_args": ("-c:v", "libvpx-vp9", "-ss", "0"),
"output_args": ("-frames:v", "1"),
},
- "webp": {},
+ "webp": {
+ "input_args": ("-c:v", "libvpx-vp9"),
+ "output_args": ("-loop", "0"),
+ },
}


0 comments on commit 0f462a2

Please sign in to comment.