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:
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user