From c34cc5d54e87e2632c39669de95c6872add9558b Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 19 Jun 2015 13:04:18 +0200 Subject: [PATCH] torbrowser: use stdenv.is64bit --- pkgs/tools/security/tor/torbrowser.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix index bd7531af18f7..7ba20e883d00 100644 --- a/pkgs/tools/security/tor/torbrowser.nix +++ b/pkgs/tools/security/tor/torbrowser.nix @@ -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"; };