2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
, boost, libsodium, libedit, re2
|
|
|
|
, net-snmp, lua, protobuf, openssl, zlib, h2o
|
2022-01-19 23:45:15 +00:00
|
|
|
, nghttp2, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dnsdist";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.8.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://downloads.powerdns.com/releases/dnsdist-${version}.tar.bz2";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-hYMj8u1RgUiLt1WPv0+E7HGYYAsHCyxTddFdQGlXJ/Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
patches = [
|
|
|
|
# Disable tests requiring networking:
|
|
|
|
# "Error connecting to new server with address 192.0.2.1:53: connecting socket to 192.0.2.1:53: Network is unreachable"
|
|
|
|
./disable-network-tests.patch
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config protobuf ];
|
2022-01-19 23:45:15 +00:00
|
|
|
buildInputs = [ systemd boost libsodium libedit re2 net-snmp lua openssl zlib h2o nghttp2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
2020-10-16 20:44:37 +00:00
|
|
|
"--with-libsodium"
|
|
|
|
"--with-re2"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--enable-dnscrypt"
|
|
|
|
"--enable-dns-over-tls"
|
|
|
|
"--enable-dns-over-https"
|
|
|
|
"--with-protobuf=yes"
|
|
|
|
"--with-net-snmp"
|
|
|
|
"--disable-dependency-tracking"
|
|
|
|
"--enable-unit-tests"
|
|
|
|
"--enable-systemd"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) dnsdist;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "DNS Loadbalancer";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dnsdist";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://dnsdist.org";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.gpl2Only;
|
2022-01-19 23:45:15 +00:00
|
|
|
maintainers = with maintainers; [ jojosch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|