about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-10-20 15:24:20 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-10-20 15:26:46 +0200
commita09d626053ac400da6f7965f577b18de4633d1e8 (patch)
tree9209fe9042eead8d9719737ce21ef6148fbdaea7 /pkgs
parenteba08858cce77b9fd68bbcc0fbfe09e1da652b4e (diff)
downloadnixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar.gz
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar.bz2
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar.lz
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar.xz
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.tar.zst
nixlib-a09d626053ac400da6f7965f577b18de4633d1e8.zip
tor-browser-bundle-bin: support installing extensions
Closes https://github.com/NixOS/nixpkgs/issues/30443
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
index 053ba1fca84f..56cab9de5d07 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
@@ -246,6 +246,11 @@ stdenv.mkDerivation rec {
     # having to synchronize between local state and store.
     mv TorBrowser/Data/Browser/profile.default/preferences/extension-overrides.js defaults/pref/torbrowser.js
 
+    # Preload extensions by moving into the runtime instead of storing under the
+    # user's profile directory.
+    mv "$TBB_IN_STORE/TorBrowser/Data/Browser/profile.default/extensions/"* \
+      "$TBB_IN_STORE/browser/extensions"
+
     # Hard-code paths to geoip data files.  TBB resolves the geoip files
     # relative to torrc-defaults_path but if we do not hard-code them
     # here, these paths end up being written to the torrc in the user's
@@ -301,10 +306,6 @@ stdenv.mkDerivation rec {
     # easily generated by firefox at startup.
     rm -f "\$HOME/TorBrowser/Data/Browser/profile.default"/{compatibility.ini,extensions.ini,extensions.json}
 
-    # Ensure that we're always using the up-to-date extensions.
-    ln -snf "$TBB_IN_STORE/TorBrowser/Data/Browser/profile.default/extensions" \
-      "\$HOME/TorBrowser/Data/Browser/profile.default/extensions"
-
     ${optionalString pulseaudioSupport ''
       # Figure out some envvars for pulseaudio
       : "\''${XDG_RUNTIME_DIR:=/run/user/\$(id -u)}"