aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/networking/fastd/default.nix
blob: 8c9a877b8f1ebcb71ecdf0f01b5bb28cbb907e4e (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
{ stdenv, fetchFromGitHub, cmake, bison, pkgconfig
, libuecc, libsodium, libcap, json_c, openssl }:

stdenv.mkDerivation rec {
  pname = "fastd";
  version = "19";

  src = fetchFromGitHub {
    owner  = "Neoraider";
    repo = "fastd";
    rev = "v${version}";
    sha256 = "1h3whjvy2n2cyvbkbg4y1z9vlrn790spzbdhj4glwp93xcykhz5i";
  };

  postPatch = ''
    substituteInPlace src/crypto/cipher/CMakeLists.txt \
      --replace 'add_subdirectory(aes128_ctr)' ""
  '';

  nativeBuildInputs = [ pkgconfig bison cmake ];
  buildInputs = [ libuecc libsodium libcap json_c openssl ];

  cmakeFlags = [
    "-DENABLE_OPENSSL=true"
  ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "Fast and Secure Tunneling Daemon";
    homepage = "https://projects.universe-factory.net/projects/fastd/wiki";
    license = with licenses; [ bsd2 bsd3 ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ fpletz ];
  };
}