From 25604d3e68e4cdfc4d4b6e565eca66d3b32905e0 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Mon, 11 May 2026 11:53:43 -0400 Subject: [PATCH] lib.strings.makeSearchPath: use concatMap rather than map and filter --- lib/strings.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index 4c78c909b4be..a05a8ed1c192 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -16,6 +16,7 @@ rec { inherit (builtins) compareVersions + concatMap elem elemAt filter @@ -564,7 +565,10 @@ rec { ::: */ makeSearchPath = - subDir: paths: concatStringsSep ":" (map (path: path + "/" + subDir) (filter (x: x != null) paths)); + subDir: paths: + concatStringsSep ":" ( + concatMap (path: if path != null then [ (path + "/" + subDir) ] else [ ]) paths + ); /** Construct a Unix-style search path by appending the given