2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2016-04-27 16:59:08 +01:00
|
|
|
|
2014-12-08 10:45:39 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tsocks";
|
2014-12-08 10:45:39 +00:00
|
|
|
version = "1.8beta5";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/tsocks/${pname}-${version}.tar.gz";
|
2014-12-08 10:45:39 +00:00
|
|
|
sha256 = "0ixkymiph771dcdzvssi9dr2pk1bzaw9zv85riv3xl40mzspx7c4";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./poll.patch ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks
|
|
|
|
substituteInPlace tsocks --replace /usr $out
|
|
|
|
export configureFlags="$configureFlags --libdir=$out/lib"
|
|
|
|
'';
|
|
|
|
|
2016-04-27 16:59:08 +01:00
|
|
|
preBuild = ''
|
|
|
|
# We don't need the saveme binary, it is in fact never stored and we're
|
|
|
|
# never injecting stuff into ld.so.preload anyway
|
|
|
|
sed -i \
|
|
|
|
-e "s,TARGETS=\(.*\)..SAVE.\(.*\),TARGETS=\1\2," \
|
|
|
|
-e "/SAVE/d" Makefile
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2014-12-08 10:45:39 +00:00
|
|
|
description = "Transparent SOCKS v4 proxying library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://tsocks.sourceforge.net/";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2014-12-08 10:45:39 +00:00
|
|
|
maintainers = with maintainers; [ edwtjo phreedom ];
|
2016-04-27 16:59:08 +01:00
|
|
|
platforms = platforms.unix;
|
2018-11-25 20:53:31 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2014-12-08 10:45:39 +00:00
|
|
|
};
|
2016-04-27 16:59:08 +01:00
|
|
|
}
|