lol
1{ stdenv, fetchurl, libevent, openssl, zlib, torsocks, libseccomp }:
2
3stdenv.mkDerivation rec {
4 name = "tor-0.2.6.10";
5
6 src = fetchurl {
7 url = "https://archive.torproject.org/tor-package-archive/${name}.tar.gz";
8 sha256 = "0542c0efe43b86619337862fa7eb02c7a74cb23a79d587090628a5f0f1224b8d";
9 };
10
11 # Note: torsocks is specified as a dependency, as the distributed
12 # 'torify' wrapper attempts to use it; although there is no
13 # ./configure time check for any of this.
14 buildInputs = [ libevent openssl zlib torsocks libseccomp ];
15
16 NIX_CFLAGS_LINK = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s";
17
18 # Patch 'torify' to point directly to torsocks.
19 patchPhase = ''
20 substituteInPlace contrib/client-tools/torify \
21 --replace 'pathfind torsocks' true \
22 --replace 'exec torsocks' 'exec ${torsocks}/bin/torsocks'
23 '';
24
25 doCheck = true;
26
27 meta = {
28 homepage = http://www.torproject.org/;
29 repositories.git = https://git.torproject.org/git/tor;
30 description = "Anonymous network router to improve privacy on the Internet";
31
32 longDescription=''
33 Tor protects you by bouncing your communications around a distributed
34 network of relays run by volunteers all around the world: it prevents
35 somebody watching your Internet connection from learning what sites you
36 visit, and it prevents the sites you visit from learning your physical
37 location. Tor works with many of your existing applications, including
38 web browsers, instant messaging clients, remote login, and other
39 applications based on the TCP protocol.
40 '';
41
42 license="mBSD";
43
44 maintainers = with stdenv.lib.maintainers;
45 [ phreedom doublec thoughtpolice ];
46 platforms = stdenv.lib.platforms.unix;
47 };
48}