summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/fr/freebind/package.nix
blob: a4c25223cacbee6d1eac36d7b606a2fc8b14a124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  stdenv,
  fetchFromGitHub,
  libnetfilter_queue,
  libnfnetlink,
}:

stdenv.mkDerivation {
  pname = "freebind";
  version = "2017-12-27";

  src = fetchFromGitHub {
    owner = "blechschmidt";
    repo = "freebind";
    rev = "9a13d6f9c12aeea4f6d3513ba2461d34f841f278";
    sha256 = "1iv2xiz9w8hbz684caw50fn4a9vc8ninfgaqafkh9sa8mzpfzcqr";
  };

  buildInputs = [
    libnetfilter_queue
    libnfnetlink
  ];

  postPatch = ''
    substituteInPlace preloader.c --replace /usr/local/ $out/
    substituteInPlace Makefile    --replace /usr/local/ $out/
  '';

  preInstall = ''
    mkdir -p $out/bin $out/lib
  '';

  meta = {
    description = "IPv4 and IPv6 address rate limiting evasion tool";
    homepage = "https://github.com/blechschmidt/freebind";
    license = lib.licenses.gpl3;
    platforms = lib.platforms.linux;
    maintainers = [ ];
  };
}