From 86511322f38d4ac760e69f5661168c841f021e8e Mon Sep 17 00:00:00 2001 From: xenia Date: Sat, 5 Jul 2025 04:28:10 -0400 Subject: [PATCH] nsd: add switch to enable libsystemd --- pkgs/servers/dns/nsd/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix index 5f0d784f6c45..30132403da78 100644 --- a/pkgs/servers/dns/nsd/default.nix +++ b/pkgs/servers/dns/nsd/default.nix @@ -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}"