git.iko.soy/typeable/nixpkgs
on master help sign in
nixpkgs: tor depends on torsocks

This may seem strange, but tor distributes its 'torify' wrapper which in turn attempts to use torsocks to bridge a connection, meaning 'tor' users out the box may want it to work. Signed-off-by: Austin Seipp <aseipp@pobox.com>

commitc206c728a898886cdb6970ad801478da854c2a44 authorAustin Seipp <aseipp@pobox.com> dateFri 5 Dec 2014, 22:37 (12 years ago) parentd92d0ec
1 file changed+12−2
pkgs/tools/security/tor/default.nix+12−2
pkgs/tools/security/tor/default.nix+12−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, libevent, openssl, zlib }:
1+{ stdenv, fetchurl, libevent, openssl, zlib, torsocks }:
22
33stdenv.mkDerivation rec {
44 name = "tor-0.2.5.10";
@@ -8,10 +8,20 @@ stdenv.mkDerivation rec {
88 sha256 = "0fx8qnwh2f8ykfx0np4hyznjfi4xfy96z59pk96y3zyjvjjh5pdk";
99 };
1010
11− buildInputs = [ libevent openssl zlib ];
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 ];
1215
1316 CFLAGS = "-lgcc_s";
1417
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+
1525 doCheck = true;
1626
1727 meta = {