From 2466716834b6f40cf88bc8795e5236a112836622 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Tue, 7 Jul 2026 12:50:47 +0200 Subject: [PATCH] nsd: remove references to -dev store paths This drops 4 paths from the closure, which saves about 3.7 MiB in nsd's closure size. --- pkgs/by-name/ns/nsd/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ns/nsd/package.nix b/pkgs/by-name/ns/nsd/package.nix index 002df58a2a85..a49d4809dbfb 100644 --- a/pkgs/by-name/ns/nsd/package.nix +++ b/pkgs/by-name/ns/nsd/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + removeReferencesTo, fstrm, libevent, openssl, @@ -51,6 +52,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config + removeReferencesTo ] ++ lib.optionals withDnstap [ protobuf ]; @@ -96,6 +98,10 @@ stdenv.mkDerivation (finalAttrs: { "--with-configdir=etc/nsd" ]; + postFixup = '' + find "$out" -type f -exec remove-references-to -t ${openssl.dev} -t ${libevent.dev} '{}' + + ''; + passthru.tests = { inherit (nixosTests) nsd; };