anchor.diff:        xlibs.libXt
       ];
     };
  +
  +  ldLibraryPath = if bits == "64" then torEnv+"/lib:"+torEnv+"/lib64"
  +        else torEnv+"/lib";
   
   in stdenv.mkDerivation rec {
     name = "tor-browser-${version}";
  
positive.code:         echo "pref(\"extensions.torlauncher.tordatadir_path\", \"\$HOME/Data/Tor/\");" >> \
            ~/Data/Browser/profile.default/preferences/extension-overrides.js
        fi
        export LD_LIBRARY_PATH=${torEnv}/lib:$out/share/tor-browser/Tor
        $out/share/tor-browser/Browser/firefox -no-remote -profile ~/Data/Browser/profile.default "$@"
      EOF
      chmod +x $out/bin/tor-browser
  
negative.code:     # Just do a simple test if all libraries get loaded by running help on
      # firefox and tor
      echo "Checking firefox..."
      LD_LIBRARY_PATH=${ldLibraryPath} Browser/firefox --help 1> /dev/null
      echo "Checking tor..."
      LD_LIBRARY_PATH=${torEnv}/lib:Tor Tor/tor --help 1> /dev/null
    '';
  