nixpkgs/pkgs/tools/security/tor/torsocks.nix

35 lines
1,000 B
Nix
Raw Normal View History

{ stdenv, fetchgit, autoreconfHook, libcap }:
stdenv.mkDerivation rec {
name = "torsocks-${version}";
2016-12-04 18:16:18 +01:00
version = "2.2.0";
2013-10-08 15:57:48 +02:00
src = fetchgit {
url = meta.repositories.git;
rev = "refs/tags/v${version}";
2016-12-04 18:16:18 +01:00
sha256 = "1xwkmfaxhhnbmvp37agnby1n53hznwhvx0dg1hj35467qfx985zc";
};
nativeBuildInputs = [ autoreconfHook ];
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
'';
2016-12-04 19:31:27 +01:00
doInstallCheck = true;
installCheckTarget = "check-recursive";
meta = {
description = "Wrapper to safely torify applications";
homepage = http://code.google.com/p/torsocks/;
2013-10-08 15:57:48 +02:00
repositories.git = https://git.torproject.org/torsocks.git;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ phreedom thoughtpolice ];
};
}