git.iko.soy/typeable/nixpkgs
on master help sign in
tor-browser-bundle: use fonts from Nixpkgs
commitfc44e91ad5fabde78aedc2cb3a5f8125f06ec4ee authorJoachim Fasting <joachifm@fastmail.fm> dateTue 26 Sep 2017, 20:34 (9 years ago) parentf05d50f
1 file changed+15
pkgs/applications/networking/browsers/tor-browser-bundle/default.nix+15
pkgs/applications/networking/browsers/tor-browser-bundle/default.nix+15
@@ -11,6 +11,9 @@
1111, coreutils
1212, hicolor_icon_theme
1313, shared_mime_info
14+, noto-fonts
15+, noto-fonts-emoji
16+
1417# Extensions, common
1518, unzip
1619, zip
@@ -172,6 +175,13 @@ let
172175 name = "tor-browser-extensions";
173176 paths = with firefoxExtensions; [ https-everywhere noscript torbutton tor-launcher ];
174177 };
178+
179+ fontsEnv = symlinkJoin {
180+ name = "tor-browser-fonts";
181+ paths = [ noto-fonts noto-fonts-emoji ];
182+ };
183+
184+ fontsDir = "${fontsEnv}/share/fonts";
175185in
176186stdenv.mkDerivation rec {
177187 name = "tor-browser-bundle-${version}";
@@ -244,6 +254,11 @@ stdenv.mkDerivation rec {
244254 $bundleData/$bundlePlatform/Data/Browser/profile.default/preferences/extension-overrides.js \
245255 >> defaults/pref/extension-overrides.js
246256
257+ # Hard-code path to TBB fonts; xref: FONTCONFIG_FILE in the wrapper below
258+ sed $bundleData/$bundlePlatform/Data/fontconfig/fonts.conf \
259+ -e "s,<dir>fonts</dir>,<dir>${fontsDir}</dir>," \
260+ > $TBDATA_PATH/fonts.conf
261+
247262 # Generate a suitable wrapper
248263 wrapper_PATH=${lib.makeBinPath [ coreutils ]}
249264 wrapper_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [