From 2acaa8b7844c80fbeeb3858d5699c920878cfd24 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Tue, 7 Jul 2026 14:09:37 +0200 Subject: [PATCH] nsd: ensure patches can be overridden Because the package replaced patchPhase entirely, using overrideAttrs to add additional patches did not work. If we need to carry patches here in the future, this will also get in the way. Fix this by moving the current patch code to postPatch. This removes the dead code with a todo on it; the package worked before with that code being dead, so let's not change it right now. --- pkgs/by-name/ns/nsd/package.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ns/nsd/package.nix b/pkgs/by-name/ns/nsd/package.nix index 7955413208a5..6efc6293ced5 100644 --- a/pkgs/by-name/ns/nsd/package.nix +++ b/pkgs/by-name/ns/nsd/package.nix @@ -57,12 +57,8 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - # TODO: prePatch doesn't actually get executed because patchPhase is overridden - prePatch = '' - substituteInPlace nsd-control-setup.sh.in --replace openssl ${openssl}/bin/openssl - ''; - - patchPhase = '' + # Prevent the install script from copying nsd.conf.sample into /etc/nsd. + postPatch = '' sed 's@$(INSTALL_DATA) nsd.conf.sample $(DESTDIR)$(nsdconfigfile).sample@@g' -i Makefile.in '';