Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 37 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "tsocks"; 5 version = "1.8beta5"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/tsocks/${pname}-${version}.tar.gz"; 9 sha256 = "0ixkymiph771dcdzvssi9dr2pk1bzaw9zv85riv3xl40mzspx7c4"; 10 }; 11 12 patches = [ ./poll.patch ]; 13 14 preConfigure = '' 15 sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks 16 substituteInPlace tsocks --replace /usr $out 17 export configureFlags="$configureFlags --libdir=$out/lib" 18 ''; 19 20 preBuild = '' 21 # We don't need the saveme binary, it is in fact never stored and we're 22 # never injecting stuff into ld.so.preload anyway 23 sed -i \ 24 -e "s,TARGETS=\(.*\)..SAVE.\(.*\),TARGETS=\1\2," \ 25 -e "/SAVE/d" Makefile 26 ''; 27 28 meta = with lib; { 29 description = "Transparent SOCKS v4 proxying library"; 30 mainProgram = "tsocks"; 31 homepage = "https://tsocks.sourceforge.net/"; 32 license = lib.licenses.gpl2; 33 maintainers = with maintainers; [ edwtjo ]; 34 platforms = platforms.unix; 35 broken = stdenv.hostPlatform.isDarwin; 36 }; 37}