nixpkgs/pkgs/by-name/pd/pdns/package.nix

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

115 lines
2.4 KiB
Nix
Raw Normal View History

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
}:
stdenv.mkDerivation (finalAttrs: {
2022-07-30 08:19:01 +00:00
pname = "pdns";
version = "4.9.2";
2016-09-17 21:30:27 +00:00
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-${finalAttrs.version}.tar.bz2";
hash = "sha256-9XBkBCcEH0xcVHDRbv+VGnA4w1PdxGGydQKQzpmy48I=";
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 = [
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 = [
(lib.enableFeature stdenv.hostPlatform.is32bit "experimental-64bit-time_t-support-on-glibc")
(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"
]
))
"sysconfdir=/etc/pdns"
2018-02-17 11:47:20 +00:00
];
2016-09-17 21:30:27 +00:00
# We want the various utilities to look for the powerdns config in
# /etc/pdns, but to actually install the sample config file in
# $out
installFlags = [ "sysconfdir=$(out)/etc/pdns" ];
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;
};
2024-09-28 18:03:53 +00:00
__structuredAttrs = true;
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.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
};
})