2024-09-28 18:12:49 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
pkg-config,
|
|
|
|
nixosTests,
|
|
|
|
boost,
|
|
|
|
yaml-cpp,
|
|
|
|
libsodium,
|
|
|
|
sqlite,
|
|
|
|
protobuf,
|
|
|
|
openssl,
|
|
|
|
systemd,
|
|
|
|
mariadb-connector-c,
|
|
|
|
postgresql,
|
|
|
|
lua,
|
|
|
|
openldap,
|
|
|
|
geoip,
|
|
|
|
curl,
|
|
|
|
unixODBC,
|
|
|
|
lmdb,
|
|
|
|
tinycdb,
|
2016-09-17 21:30:27 +00:00
|
|
|
}:
|
|
|
|
|
2023-06-02 02:18:05 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-07-30 08:19:01 +00:00
|
|
|
pname = "pdns";
|
2024-10-02 14:27:19 +00:00
|
|
|
version = "4.9.2";
|
2016-09-17 21:30:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-06-02 02:18:05 +00:00
|
|
|
url = "https://downloads.powerdns.com/releases/pdns-${finalAttrs.version}.tar.bz2";
|
2024-10-02 14:27:19 +00:00
|
|
|
hash = "sha256-9XBkBCcEH0xcVHDRbv+VGnA4w1PdxGGydQKQzpmy48I=";
|
2016-09-17 21:30:27 +00:00
|
|
|
};
|
2022-03-15 03:13:23 +00:00
|
|
|
# redact configure flags from version output to reduce closure size
|
|
|
|
patches = [ ./version.patch ];
|
2016-09-17 21:30:27 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-02-17 11:47:20 +00:00
|
|
|
buildInputs = [
|
2023-06-02 02:18:05 +00:00
|
|
|
boost
|
|
|
|
mariadb-connector-c
|
|
|
|
postgresql
|
|
|
|
lua
|
|
|
|
openldap
|
|
|
|
sqlite
|
|
|
|
protobuf
|
|
|
|
geoip
|
|
|
|
yaml-cpp
|
|
|
|
libsodium
|
|
|
|
curl
|
|
|
|
unixODBC
|
|
|
|
openssl
|
|
|
|
systemd
|
|
|
|
lmdb
|
|
|
|
tinycdb
|
2022-03-14 13:51:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
2024-10-02 14:37:39 +00:00
|
|
|
(lib.enableFeature stdenv.hostPlatform.is32bit "experimental-64bit-time_t-support-on-glibc")
|
2024-09-28 18:00:26 +00:00
|
|
|
(lib.enableFeature false "silent-rules")
|
|
|
|
(lib.enableFeature true "dns-over-tls")
|
|
|
|
(lib.enableFeature true "unit-tests")
|
|
|
|
(lib.enableFeature true "reproducible")
|
|
|
|
(lib.enableFeature true "tools")
|
|
|
|
(lib.enableFeature true "ixfrdist")
|
|
|
|
(lib.enableFeature true "systemd")
|
|
|
|
(lib.withFeature true "libsodium")
|
|
|
|
(lib.withFeature true "sqlite3")
|
|
|
|
(lib.withFeatureAs true "libcrypto" (lib.getDev openssl))
|
2024-09-28 18:03:53 +00:00
|
|
|
(lib.withFeatureAs true "modules" "")
|
2024-09-28 18:12:49 +00:00
|
|
|
(lib.withFeatureAs true "dynmodules" (
|
|
|
|
lib.concatStringsSep " " [
|
|
|
|
"bind"
|
|
|
|
"geoip"
|
|
|
|
"gmysql"
|
|
|
|
"godbc"
|
|
|
|
"gpgsql"
|
|
|
|
"gsqlite3"
|
|
|
|
"ldap"
|
|
|
|
"lmdb"
|
|
|
|
"lua2"
|
|
|
|
"pipe"
|
|
|
|
"remote"
|
|
|
|
"tinydns"
|
|
|
|
]
|
|
|
|
))
|
2023-06-29 10:42:01 +00:00
|
|
|
"sysconfdir=/etc/pdns"
|
2018-02-17 11:47:20 +00:00
|
|
|
];
|
2016-09-17 21:30:27 +00:00
|
|
|
|
2023-02-25 15:11:53 +00:00
|
|
|
# We want the various utilities to look for the powerdns config in
|
2023-06-29 10:42:01 +00:00
|
|
|
# /etc/pdns, but to actually install the sample config file in
|
2023-02-25 15:11:53 +00:00
|
|
|
# $out
|
2023-06-29 10:42:01 +00:00
|
|
|
installFlags = [ "sysconfdir=$(out)/etc/pdns" ];
|
2023-02-25 15:11:53 +00:00
|
|
|
|
2019-07-13 09:34:17 +00:00
|
|
|
enableParallelBuilding = true;
|
2018-02-17 11:47:20 +00:00
|
|
|
doCheck = true;
|
2016-09-17 21:30:27 +00:00
|
|
|
|
2020-10-10 11:58:03 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixos = nixosTests.powerdns;
|
|
|
|
};
|
|
|
|
|
2024-09-28 18:03:53 +00:00
|
|
|
__structuredAttrs = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-09-17 21:30:27 +00:00
|
|
|
description = "Authoritative DNS server";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.powerdns.com";
|
2019-07-04 00:25:32 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2024-05-23 08:44:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-09-28 18:12:49 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
mic92
|
|
|
|
disassembler
|
|
|
|
nickcao
|
|
|
|
];
|
2016-09-17 21:30:27 +00:00
|
|
|
};
|
2023-06-02 02:18:05 +00:00
|
|
|
})
|