lol
1{ lib, stdenv, fetchFromGitHub, libnetfilter_queue, libnfnetlink }:
2
3stdenv.mkDerivation {
4 pname = "freebind";
5 version = "2017-12-27";
6
7 src = fetchFromGitHub {
8 owner = "blechschmidt";
9 repo = "freebind";
10 rev = "9a13d6f9c12aeea4f6d3513ba2461d34f841f278";
11 sha256 = "1iv2xiz9w8hbz684caw50fn4a9vc8ninfgaqafkh9sa8mzpfzcqr";
12 };
13
14 buildInputs = [ libnetfilter_queue libnfnetlink ];
15
16 postPatch = ''
17 substituteInPlace preloader.c --replace /usr/local/ $out/
18 substituteInPlace Makefile --replace /usr/local/ $out/
19 '';
20
21 preInstall = ''
22 mkdir -p $out/bin $out/lib
23 '';
24
25 meta = with lib; {
26 description = "IPv4 and IPv6 address rate limiting evasion tool";
27 homepage = "https://github.com/blechschmidt/freebind";
28 license = licenses.gpl3;
29 platforms = platforms.linux;
30 maintainers = with maintainers; [ ];
31 };
32}