acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ts / tsocks / package.nix
blobc12f9a44ac6d229c831fd568b2a5d2edc206736a
1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
4   pname = "tsocks";
5   version = "1.8beta5";
7   src = fetchurl {
8     url = "mirror://sourceforge/tsocks/${pname}-${version}.tar.gz";
9     sha256 = "0ixkymiph771dcdzvssi9dr2pk1bzaw9zv85riv3xl40mzspx7c4";
10   };
12   patches = [ ./poll.patch ];
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   '';
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   '';
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   };