about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-09-26 20:34:56 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-09-26 23:17:11 +0200
commitfc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee (patch)
tree93493ce840ff944f7006059c148d17bc0b8ab61b /pkgs
parentf05d50f36c879400a679498eb9677f8653a892e3 (diff)
downloadnixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar.gz
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar.bz2
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar.lz
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar.xz
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.tar.zst
nixlib-fc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee.zip
tor-browser-bundle: use fonts from Nixpkgs
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
index 73c5dc6b3ee4..979aac5b92f8 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
@@ -11,6 +11,9 @@
 , coreutils
 , hicolor_icon_theme
 , shared_mime_info
+, noto-fonts
+, noto-fonts-emoji
+
 # Extensions, common
 , unzip
 , zip
@@ -172,6 +175,13 @@ let
     name = "tor-browser-extensions";
     paths = with firefoxExtensions; [ https-everywhere noscript torbutton tor-launcher ];
   };
+
+  fontsEnv = symlinkJoin {
+    name = "tor-browser-fonts";
+    paths = [ noto-fonts noto-fonts-emoji ];
+  };
+
+  fontsDir = "${fontsEnv}/share/fonts";
 in
 stdenv.mkDerivation rec {
   name = "tor-browser-bundle-${version}";
@@ -244,6 +254,11 @@ stdenv.mkDerivation rec {
       $bundleData/$bundlePlatform/Data/Browser/profile.default/preferences/extension-overrides.js \
       >> defaults/pref/extension-overrides.js
 
+    # Hard-code path to TBB fonts; xref: FONTCONFIG_FILE in the wrapper below
+    sed $bundleData/$bundlePlatform/Data/fontconfig/fonts.conf \
+        -e "s,<dir>fonts</dir>,<dir>${fontsDir}</dir>," \
+        > $TBDATA_PATH/fonts.conf
+
     # Generate a suitable wrapper
     wrapper_PATH=${lib.makeBinPath [ coreutils ]}
     wrapper_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [