1 { lib, stdenv, fetchgit, fetchurl, autoreconfHook, libcap }:
3 stdenv.mkDerivation rec {
8 url = "https://git.torproject.org/torsocks.git";
9 rev = "refs/tags/v${version}";
10 sha256 = "0x0wpcigf22sjxg7bm0xzqihmsrz51hl4v8xf91qi4qnmr4ny1hb";
13 nativeBuildInputs = [ autoreconfHook ];
15 patches = lib.optional stdenv.isDarwin
17 url = "https://trac.torproject.org/projects/tor/raw-attachment/ticket/28538/0001-Fix-macros-for-accept4-2.patch";
18 sha256 = "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0";
24 -e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \
26 '' + lib.optionalString stdenv.isLinux ''
28 -e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \
32 doInstallCheck = true;
33 installCheckTarget = "check-recursive";
36 description = "Wrapper to safely torify applications";
37 homepage = "https://github.com/dgoulet/torsocks";
38 license = lib.licenses.gpl2;
39 platforms = lib.platforms.unix;
40 maintainers = with lib.maintainers; [ thoughtpolice ];