summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorstuebinm2024-04-14 22:56:02 +0200
committerstuebinm2024-04-14 22:56:02 +0200
commitc0d96cf6811e4e96245b9d06ea28572494ec4f5e (patch)
treef938e7faf30c2261e537de4c4dd0526fb2631a21 /pkgs
parent18d998b5de5a063e3502ee5aa2a75f5fbb6762de (diff)
element-web: use older emoji fonts
thanks to networkException for demonstrating how to do this; I'd not have had the patience to figure out which files to replace otherwise.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/overlay.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index 15b059c..f40aac1 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -118,11 +118,25 @@ in
element-web-unwrapped = super.element-web-unwrapped.overrideAttrs {
patches = [ ./patches/element-css.patch ];
- # the below patches the javascript's assumptions about box height
+ # replace the emoji fonts with their older version, which i liked
+ # more. also patch the javascript's assumptions about box height
# in the left side bar so that hiding overflow will work correctly
# should be .mx_RoomTile's height + 12px
# TODO: once --replace-fail is in stable use that instead
- preBuild = ''
+ preBuild = let
+ TwemojiMozilla-colr = self.fetchurl {
+ url = "https://github.com/matrix-org/matrix-react-sdk/raw/a465b1659f1f7763a1a5afcd56b7aa8513c57342/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2";
+ hash = "sha256-TS2DTfotWc/C+7dKv9TYEnxognfTQ3/l8uPD5Ptozbs=";
+ };
+ TwemojiMozilla-sbix = self.fetchurl {
+ url = "https://github.com/matrix-org/matrix-react-sdk/raw/a465b1659f1f7763a1a5afcd56b7aa8513c57342/res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2";
+ hash = "sha256-sbZGHcRiscCWrelyLQav6Q1a0x5RQInSNh/XwFlZHj8=";
+ };
+ in ''
+ ln -sf ${TwemojiMozilla-colr} \
+ node_modules/matrix-react-sdk/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2
+ ln -sf ${TwemojiMozilla-sbix} \
+ node_modules/matrix-react-sdk/res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2
substituteInPlace node_modules/matrix-react-sdk/src/stores/room-list/ListLayout.ts \
--replace "TILE_HEIGHT_PX = 44" "TILE_HEIGHT_PX = 32"
'';