nixpkgs/pkgs/servers/dns/pdns/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.8 KiB
Nix
Raw Normal View History

2022-03-14 13:51:32 +00:00
{ lib, stdenv, fetchurl, pkg-config, nixosTests
2020-10-09 00:14:11 +00:00
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
2022-03-14 13:51:32 +00:00
, mariadb-connector-c, postgresql, lua, openldap, geoip, curl, unixODBC, lmdb, tinycdb
2016-09-17 21:30:27 +00:00
}:
stdenv.mkDerivation rec {
pname = "powerdns";
2022-04-26 22:12:21 +00:00
version = "4.6.2";
2016-09-17 21:30:27 +00:00
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
2022-04-26 22:12:21 +00:00
hash = "sha256-9EOEiUS7Ebu0hQIhYTs6Af+1f+vyZx2myqVzYu4LGbg=";
2016-09-17 21:30:27 +00:00
};
# redact configure flags from version output to reduce closure size
patches = [ ./version.patch ];
2016-09-17 21:30:27 +00:00
nativeBuildInputs = [ pkg-config ];
2018-02-17 11:47:20 +00:00
buildInputs = [
2022-03-14 13:51:32 +00:00
boost mariadb-connector-c postgresql lua openldap sqlite protobuf geoip
libyamlcpp libsodium curl unixODBC openssl systemd lmdb tinycdb
];
# Configure phase requires 64-bit time_t even on 32-bit platforms.
NIX_CFLAGS_COMPILE = lib.optionals stdenv.hostPlatform.is32bit [
"-D_TIME_BITS=64" "-D_FILE_OFFSET_BITS=64"
];
2022-03-14 13:51:32 +00:00
configureFlags = [
"--disable-silent-rules"
"--enable-dns-over-tls"
"--enable-unit-tests"
"--enable-reproducible"
"--enable-tools"
"--enable-ixfrdist"
"--enable-systemd"
"--with-libsodium"
"--with-sqlite3"
"--with-libcrypto=${openssl.dev}"
2018-02-17 11:47:20 +00:00
];
2016-09-17 21:30:27 +00:00
# nix destroy with-modules arguments, when using configureFlags
preConfigure = ''
2022-03-14 13:51:32 +00:00
configureFlagsArray+=(
"--with-modules="
"--with-dynmodules=bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns"
2016-09-17 21:30:27 +00:00
)
'';
2018-02-17 11:47:20 +00:00
enableParallelBuilding = true;
2018-02-17 11:47:20 +00:00
doCheck = true;
2016-09-17 21:30:27 +00:00
passthru.tests = {
nixos = nixosTests.powerdns;
};
meta = with lib; {
2016-09-17 21:30:27 +00:00
description = "Authoritative DNS server";
homepage = "https://www.powerdns.com";
platforms = platforms.unix;
broken = stdenv.isDarwin;
2016-09-17 21:30:27 +00:00
license = licenses.gpl2;
2022-03-14 13:51:32 +00:00
maintainers = with maintainers; [ mic92 disassembler nickcao ];
2016-09-17 21:30:27 +00:00
};
}