3
0
Fork 0
forked from mirrors/nixpkgs

torbrowser: use stdenv.is64bit

This commit is contained in:
Joachim Fasting 2015-06-19 13:04:18 +02:00
parent 9d430e6446
commit c34cc5d54e

View file

@ -2,9 +2,6 @@
, xorg, alsaLib, dbus, dbus_glib, glib, gtk, atk, pango, freetype, fontconfig
, gdk_pixbuf, cairo, zlib}:
let
bits = if stdenv.system == "x86_64-linux" then "64"
else "32";
# isolated tor environment
torEnv = buildEnv {
name = "tor-env";
@ -15,16 +12,15 @@ let
];
};
ldLibraryPath = if bits == "64" then torEnv+"/lib:"+torEnv+"/lib64"
else torEnv+"/lib";
ldLibraryPath = ''${torEnv}/lib${stdenv.lib.optionalString stdenv.is64bit ":${torEnv}/lib64"}'';
in stdenv.mkDerivation rec {
name = "tor-browser-${version}";
version = "4.5.3";
src = fetchurl {
url = "https://archive.torproject.org/tor-package-archive/torbrowser/${version}/tor-browser-linux${bits}-${version}_en-US.tar.xz";
sha256 = if bits == "64" then
url = "https://archive.torproject.org/tor-package-archive/torbrowser/${version}/tor-browser-linux${if stdenv.is64bit then "64" else "32"}-${version}_en-US.tar.xz";
sha256 = if stdenv.is64bit then
"24c517d2aeb15ba5eeda1eb87f483ed4fb0c22b07a95ca26af9f692e0d4d9b7c" else
"154d659583048e91870c40921561f0519babf6d3c9ac439f6fb74ed66824463f";
};