torsocks: Fix the Darwin build
This commit is contained in:
parent
7cd05de015
commit
ef3cb36ba4
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchgit, autoreconfHook, libcap }:
|
{ stdenv, fetchgit, fetchurl, autoreconfHook, libcap }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "torsocks";
|
pname = "torsocks";
|
||||||
@ -12,10 +12,19 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
|
|
||||||
|
patches = stdenv.lib.optional stdenv.isDarwin
|
||||||
|
(fetchurl {
|
||||||
|
url = "https://trac.torproject.org/projects/tor/raw-attachment/ticket/28538/0001-Fix-macros-for-accept4-2.patch";
|
||||||
|
sha256 = "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0";
|
||||||
|
});
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Patch torify_app()
|
# Patch torify_app()
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \
|
-e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \
|
||||||
|
src/bin/torsocks.in
|
||||||
|
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
|
sed -i \
|
||||||
-e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \
|
-e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \
|
||||||
src/bin/torsocks.in
|
src/bin/torsocks.in
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user