go: merge package src links with mergeAttrsList

The GOPATH src symlinks were combined with a linear foldl' of //.
mergeAttrsList is the equivalent shallow merge and scales with the package
count without quadratic recopies.
This commit is contained in:
Austin Horstman
2026-06-17 13:04:43 -05:00
parent b06723c4d4
commit cbbddc4a6f
+1 -1
View File
@@ -161,7 +161,7 @@ in
mkSrc = n: v: { "${mainGoPath}/src/${n}".source = v; };
in
lib.foldl' (a: b: a // b) { } (lib.mapAttrsToList mkSrc cfg.packages)
lib.mergeAttrsList (lib.mapAttrsToList mkSrc cfg.packages)
);
}