2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, boost, nixosTests
|
2017-01-17 23:27:26 +00:00
|
|
|
, openssl, systemd, lua, luajit, protobuf
|
2024-02-14 17:09:13 +00:00
|
|
|
, libsodium
|
|
|
|
, curl
|
|
|
|
, rustPlatform, cargo, rustc
|
2017-01-17 23:27:26 +00:00
|
|
|
, enableProtoBuf ? false
|
|
|
|
}:
|
|
|
|
|
2024-02-14 17:09:13 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "pdns-recursor";
|
2024-02-14 17:09:13 +00:00
|
|
|
version = "5.0.2";
|
2017-01-17 23:27:26 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-02-14 17:09:13 +00:00
|
|
|
url = "https://downloads.powerdns.com/releases/pdns-recursor-${finalAttrs.version}.tar.bz2";
|
|
|
|
hash = "sha256-qQ6LYf3BgbWWFEw1kgEYynHDuV9GZYzOfoIidQ3kXKk=";
|
2017-01-17 23:27:26 +00:00
|
|
|
};
|
|
|
|
|
2024-02-14 17:09:13 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit (finalAttrs) src;
|
|
|
|
sourceRoot = "pdns-recursor-${finalAttrs.version}/settings/rust";
|
|
|
|
hash = "sha256-XHzuYkO91TJNU2DYqMlafqrc2zR1WvIrNLjFHL2FcwA=";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoRoot = "settings/rust";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
pkg-config
|
|
|
|
];
|
2017-01-17 23:27:26 +00:00
|
|
|
buildInputs = [
|
2017-09-14 19:24:37 +00:00
|
|
|
boost openssl systemd
|
2018-01-28 23:57:05 +00:00
|
|
|
lua luajit
|
2024-02-14 17:09:13 +00:00
|
|
|
libsodium
|
|
|
|
curl
|
2021-03-05 02:47:13 +00:00
|
|
|
] ++ lib.optional enableProtoBuf protobuf;
|
2017-01-17 23:27:26 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-reproducible"
|
2020-10-17 21:42:41 +00:00
|
|
|
"--enable-systemd"
|
2024-02-14 17:09:13 +00:00
|
|
|
"--enable-dns-over-tls"
|
2023-06-29 10:42:01 +00:00
|
|
|
"sysconfdir=/etc/pdns-recursor"
|
2017-01-17 23:27:26 +00:00
|
|
|
];
|
|
|
|
|
2023-06-29 10:42:01 +00:00
|
|
|
installFlags = [ "sysconfdir=$(out)/etc/pdns-recursor" ];
|
2023-02-25 15:11:53 +00:00
|
|
|
|
2017-11-05 17:16:36 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-10-12 17:55:38 +00:00
|
|
|
passthru.tests = {
|
2021-05-20 21:23:31 +00:00
|
|
|
inherit (nixosTests) pdns-recursor ncdns;
|
2020-10-12 17:55:38 +00:00
|
|
|
};
|
|
|
|
|
2021-03-05 02:47:13 +00:00
|
|
|
meta = with lib; {
|
2017-01-17 23:27:26 +00:00
|
|
|
description = "A recursive DNS server";
|
2020-03-09 01:24:14 +00:00
|
|
|
homepage = "https://www.powerdns.com/";
|
2017-01-17 23:27:26 +00:00
|
|
|
platforms = platforms.linux;
|
2021-06-02 15:17:39 +00:00
|
|
|
badPlatforms = [
|
|
|
|
"i686-linux" # a 64-bit time_t is needed
|
|
|
|
];
|
2021-06-13 09:03:16 +00:00
|
|
|
license = licenses.gpl2Only;
|
2017-01-17 23:27:26 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
|
|
};
|
2024-02-14 17:09:13 +00:00
|
|
|
})
|