Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tsocks";
|
|
version = "1.8beta5";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/tsocks/${pname}-${version}.tar.gz";
|
|
sha256 = "0ixkymiph771dcdzvssi9dr2pk1bzaw9zv85riv3xl40mzspx7c4";
|
|
};
|
|
|
|
patches = [ ./poll.patch ];
|
|
|
|
preConfigure = ''
|
|
sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks
|
|
substituteInPlace configure \
|
|
--replace-fail "main(){return(0);}" "int main(){return(0);}"
|
|
substituteInPlace tsocks --replace /usr $out
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--libdir=${placeholder "out"}/lib"
|
|
];
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Transparent SOCKS v4 proxying library";
|
|
mainProgram = "tsocks";
|
|
homepage = "https://tsocks.sourceforge.net/";
|
|
license = lib.licenses.gpl2;
|
|
maintainers = with maintainers; [ edwtjo ];
|
|
platforms = platforms.unix;
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|