2016-12-04 18:58:12 +01:00
|
|
|
{ stdenv, fetchgit, autoreconfHook, libcap }:
|
2014-12-06 05:32:56 +01:00
|
|
|
|
2010-10-01 04:38:03 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "torsocks";
|
2019-01-09 19:52:35 +01:00
|
|
|
version = "2.3.0";
|
2014-12-06 05:32:56 +01:00
|
|
|
|
2013-10-08 15:57:48 +02:00
|
|
|
src = fetchgit {
|
2014-12-06 05:32:56 +01:00
|
|
|
url = meta.repositories.git;
|
|
|
|
rev = "refs/tags/v${version}";
|
2019-01-09 19:52:35 +01:00
|
|
|
sha256 = "0x0wpcigf22sjxg7bm0xzqihmsrz51hl4v8xf91qi4qnmr4ny1hb";
|
2010-10-01 04:38:03 +02:00
|
|
|
};
|
|
|
|
|
2016-12-04 18:23:02 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2010-10-01 04:38:03 +02:00
|
|
|
|
2016-12-04 18:58:12 +01:00
|
|
|
postPatch = ''
|
|
|
|
# Patch torify_app()
|
|
|
|
sed -i \
|
|
|
|
-e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \
|
|
|
|
-e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \
|
|
|
|
src/bin/torsocks.in
|
2014-12-06 05:32:56 +01:00
|
|
|
'';
|
|
|
|
|
2016-12-04 19:31:27 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckTarget = "check-recursive";
|
|
|
|
|
2010-10-01 04:38:03 +02:00
|
|
|
meta = {
|
2014-12-06 05:32:56 +01:00
|
|
|
description = "Wrapper to safely torify applications";
|
2017-10-27 01:44:19 +02:00
|
|
|
homepage = https://github.com/dgoulet/torsocks;
|
2013-10-08 15:57:48 +02:00
|
|
|
repositories.git = https://git.torproject.org/torsocks.git;
|
2014-12-06 05:32:56 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ phreedom thoughtpolice ];
|
2010-10-01 04:38:03 +02:00
|
|
|
};
|
|
|
|
}
|