nsd: add switch to enable libsystemd (#422819)

This commit is contained in:
Aleksana
2025-07-06 17:29:50 +08:00
committed by GitHub
+13 -4
View File
@@ -4,6 +4,8 @@
fetchurl,
libevent,
openssl,
pkg-config,
systemdMinimal,
nixosTests,
bind8Stats ? false,
checking ? false,
@@ -16,6 +18,7 @@
rootServer ? false,
rrtypes ? false,
zoneStats ? false,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
configFile ? "/etc/nsd/nsd.conf",
}:
@@ -33,10 +36,15 @@ stdenv.mkDerivation rec {
substituteInPlace nsd-control-setup.sh.in --replace openssl ${openssl}/bin/openssl
'';
buildInputs = [
libevent
openssl
];
buildInputs =
[
libevent
openssl
]
++ lib.optionals withSystemd [
systemdMinimal
pkg-config
];
enableParallelBuilding = true;
@@ -55,6 +63,7 @@ stdenv.mkDerivation rec {
++ edf rootServer "root-server"
++ edf rrtypes "draft-rrtypes"
++ edf zoneStats "zone-stats"
++ edf withSystemd "systemd"
++ [
"--with-ssl=${openssl.dev}"
"--with-libevent=${libevent.dev}"