3
0
Fork 0
forked from mirrors/nixpkgs

torsocks: redo patching, ensure getcap is available

This commit is contained in:
Joachim Fasting 2016-12-04 18:58:12 +01:00
parent 8aebb6b181
commit 95608c3e8d
No known key found for this signature in database
GPG key ID: 7544761007FE4E08

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, autoreconfHook, which }:
{ stdenv, fetchgit, autoreconfHook, libcap }:
stdenv.mkDerivation rec {
name = "torsocks-${version}";
@ -12,9 +12,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
patchPhase = ''
substituteInPlace src/bin/torsocks.in \
--replace which ${which}/bin/which
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
'';
meta = {