2021-04-27 12:22:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bison
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2021-06-27 12:38:34 +00:00
|
|
|
, libmnl
|
2021-04-27 12:22:18 +00:00
|
|
|
, libuecc
|
|
|
|
, libsodium
|
|
|
|
, libcap
|
|
|
|
, json_c
|
|
|
|
, openssl
|
|
|
|
}:
|
2016-10-13 19:41:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fastd";
|
2021-06-27 12:38:34 +00:00
|
|
|
version = "22";
|
2016-10-13 19:41:22 +00:00
|
|
|
|
2020-05-23 08:21:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Neoraider";
|
|
|
|
repo = "fastd";
|
|
|
|
rev = "v${version}";
|
2021-06-27 12:38:34 +00:00
|
|
|
sha256 = "0qni32j7d3za9f87m68wq8zgalvfxdrx1zxi6l4x7vvmpcw5nhpq";
|
2016-10-13 19:41:22 +00:00
|
|
|
};
|
|
|
|
|
2021-04-27 12:22:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
json_c
|
|
|
|
libcap
|
|
|
|
libsodium
|
|
|
|
libuecc
|
|
|
|
openssl
|
2021-06-27 12:38:34 +00:00
|
|
|
] ++ lib.optionals (stdenv.isLinux) [
|
|
|
|
libmnl
|
2021-04-27 12:22:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# some options are only available on x86
|
|
|
|
mesonFlags = lib.optionals (!stdenv.isx86_64 && !stdenv.isi686) [
|
|
|
|
"-Dcipher_salsa20_xmm=disabled"
|
|
|
|
"-Dcipher_salsa2012_xmm=disabled"
|
|
|
|
"-Dmac_ghash_pclmulqdq=disabled"
|
|
|
|
];
|
2020-05-23 08:21:30 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-10-13 19:41:22 +00:00
|
|
|
description = "Fast and Secure Tunneling Daemon";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://projects.universe-factory.net/projects/fastd/wiki";
|
2016-10-13 19:41:22 +00:00
|
|
|
license = with licenses; [ bsd2 bsd3 ];
|
2016-10-13 20:02:36 +00:00
|
|
|
platforms = platforms.linux;
|
2016-10-13 19:41:22 +00:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|