nixpkgs/pkgs/servers/dns/powerdns/default.nix
2020-10-12 20:11:47 -04:00

54 lines
1.5 KiB
Nix

{ stdenv, fetchurl, pkgconfig, nixosTests
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
, mysql57, postgresql, lua, openldap, geoip, curl, opendbx, unixODBC
}:
stdenv.mkDerivation rec {
pname = "powerdns";
version = "4.2.3";
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
sha256 = "1vf03hssk9rfhvhzfc5ca2r4ly67wq0czr0ysvdrk8pnb0yk6yfi";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip
libyamlcpp libsodium curl opendbx unixODBC openssl systemd
];
# 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}
--with-libsodium
--enable-tools
--disable-dependency-tracking
--disable-silent-rules
--enable-reproducible
--enable-unit-tests
--enable-systemd
)
'';
enableParallelBuilding = true;
doCheck = true;
passthru.tests = {
nixos = nixosTests.powerdns;
};
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 ];
};
}