From 00f9c30eaa178d8fe43584c8bc950c549eedbfd6 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Mon, 11 May 2026 13:02:22 -0400 Subject: [PATCH] lib.strings.makeSearchPathOutput: only map once --- lib/strings.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index a05a8ed1c192..3fb5d7994440 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -606,8 +606,14 @@ rec { ::: */ makeSearchPathOutput = - output: subDir: pkgs: - makeSearchPath subDir (map (lib.getOutput output) pkgs); + output: + let + getOutput' = lib.getOutput output; + in + subDir: pkgs: + concatStringsSep ":" ( + concatMap (path: if path != null then [ (getOutput' path + "/" + subDir) ] else [ ]) pkgs + ); /** Construct a library search path (such as RPATH) containing the