File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 95
95
#
96
96
# Also, we take care to keep duplicates out of the list, otherwise we may see
97
97
# "Argument list too long" errors from bash when entering a shell.
98
- uniqueInputs = inputList : builtins . listToAttrs ( builtins . map ( x : lib . nameValuePair ( x . name ) x ) inputList ) ;
99
- unionComponentInputs = inputsSoFar : c :
100
- inputsSoFar // uniqueInputs c . buildInputs // uniqueInputs c . propagatedBuildInputs ;
101
- systemInputs' = lib . lists . foldl unionComponentInputs { } selectedComponents ;
102
- systemInputs = removeSelectedInputs ( builtins . attrValues systemInputs' ) ;
98
+ #
99
+ # Version of `lib.unique` that should be fast if the name attributes are unique
100
+ uniqueWithName = list :
101
+ lib . concatMap lib . unique (
102
+ builtins . attrValues (
103
+ builtins . groupBy ( x : if __typeOf x == "set" then x . name or "noname" else "notset" ) list ) ) ;
104
+ allSystemInputs = lib . concatMap ( c : c . buildInputs ++ c . propagatedBuildInputs ) selectedComponents ;
105
+ systemInputs = removeSelectedInputs ( uniqueWithName allSystemInputs ) ;
103
106
104
107
nativeBuildInputs = removeSelectedInputs
105
108
( lib . concatMap ( c : c . executableToolDepends ) selectedComponents ) ;
You can’t perform that action at this time.
0 commit comments