2020-10-16 20:44:37 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, nixosTests
|
|
|
|
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
, mysql57, postgresql, lua, openldap, geoip, curl, opendbx, unixODBC
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "powerdns";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "4.2.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "1vf03hssk9rfhvhzfc5ca2r4ly67wq0czr0ysvdrk8pnb0yk6yfi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [
|
|
|
|
boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip
|
2020-10-16 20:44:37 +00:00
|
|
|
libyamlcpp libsodium curl opendbx unixODBC openssl systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# nix destroy with-modules arguments, when using configureFlags
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
"--with-modules=bind gmysql geoip godbc gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote"
|
|
|
|
--with-sqlite3
|
|
|
|
--with-socketdir=/var/lib/powerdns
|
|
|
|
--with-libcrypto=${openssl.dev}
|
2020-10-16 20:44:37 +00:00
|
|
|
--with-libsodium
|
2020-04-24 23:36:52 +00:00
|
|
|
--enable-tools
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--enable-reproducible
|
|
|
|
--enable-unit-tests
|
2020-10-16 20:44:37 +00:00
|
|
|
--enable-systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = true;
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixos = nixosTests.powerdns;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Authoritative DNS server";
|
|
|
|
homepage = "https://www.powerdns.com";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ mic92 disassembler ];
|
|
|
|
};
|
|
|
|
}
|