2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, nixosTests
|
2020-10-09 02:14:11 +02:00
|
|
|
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
|
2020-10-15 02:01:42 +02:00
|
|
|
, mysql57, postgresql, lua, openldap, geoip, curl, unixODBC
|
2016-09-17 23:30:27 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "powerdns";
|
2020-10-15 02:01:42 +02:00
|
|
|
version = "4.3.1";
|
2016-09-17 23:30:27 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
|
2020-10-15 02:01:42 +02:00
|
|
|
sha256 = "0if27znz528sir52y9i4gcfhdsym7yxiwjgffy9lpscf1426q56m";
|
2016-09-17 23:30:27 +02:00
|
|
|
};
|
|
|
|
|
2021-01-04 19:12:33 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch { # remove for >= 4.4.0
|
|
|
|
name = "gcc-10_undefined-reference.diff";
|
|
|
|
url = "https://github.com/PowerDNS/pdns/commit/05c9dd77b28.diff";
|
|
|
|
sha256 = "1m9szbi02h9kcabgw3kb8k9qrb54d34z0qzizrlfiw3hxs6c2zql";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-02-17 12:47:20 +01:00
|
|
|
buildInputs = [
|
|
|
|
boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip
|
2020-10-15 02:01:42 +02:00
|
|
|
libyamlcpp libsodium curl unixODBC openssl systemd
|
2018-02-17 12:47:20 +01:00
|
|
|
];
|
2016-09-17 23:30:27 +02:00
|
|
|
|
|
|
|
# nix destroy with-modules arguments, when using configureFlags
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
2020-10-15 02:01:42 +02:00
|
|
|
"--with-modules=bind gmysql geoip godbc gpgsql gsqlite3 ldap lua2 pipe random remote"
|
2016-09-17 23:30:27 +02:00
|
|
|
--with-sqlite3
|
2019-09-08 09:09:29 +02:00
|
|
|
--with-libcrypto=${openssl.dev}
|
2020-10-09 01:53:48 +02:00
|
|
|
--with-libsodium
|
2016-09-17 23:30:27 +02:00
|
|
|
--enable-tools
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--enable-reproducible
|
|
|
|
--enable-unit-tests
|
2020-10-09 02:14:11 +02:00
|
|
|
--enable-systemd
|
2016-09-17 23:30:27 +02:00
|
|
|
)
|
|
|
|
'';
|
2018-02-17 12:47:20 +01:00
|
|
|
|
2019-07-13 11:34:17 +02:00
|
|
|
enableParallelBuilding = true;
|
2018-02-17 12:47:20 +01:00
|
|
|
doCheck = true;
|
2016-09-17 23:30:27 +02:00
|
|
|
|
2020-10-10 13:58:03 +02:00
|
|
|
passthru.tests = {
|
|
|
|
nixos = nixosTests.powerdns;
|
|
|
|
};
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-09-17 23:30:27 +02:00
|
|
|
description = "Authoritative DNS server";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.powerdns.com";
|
2019-07-04 02:25:32 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
broken = stdenv.isDarwin;
|
2016-09-17 23:30:27 +02:00
|
|
|
license = licenses.gpl2;
|
2018-03-18 01:30:44 +01:00
|
|
|
maintainers = with maintainers; [ mic92 disassembler ];
|
2016-09-17 23:30:27 +02:00
|
|
|
};
|
|
|
|
}
|