File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 92
92
# We need to remove any inputs which are selected components (see above).
93
93
# `buildInputs`, `propagatedBuildInputs`, and `executableToolDepends` contain component
94
94
# derivations, not packages, so we use `removeSelectedInputs`).
95
- systemInputs = removeSelectedInputs ( lib . concatMap
96
- ( c : c . buildInputs ++ c . propagatedBuildInputs ) selectedComponents ) ;
95
+ #
96
+ # Also, we take care to keep duplicates out of the list, otherwise we may see
97
+ # "Argument list too long" errors from bash when entering a shell.
98
+ addUnique = new : existing :
99
+ lib . lists . foldr ( x : acc : if lib . lists . any ( y : x == y ) acc then acc else [ x ] ++ acc ) existing new ;
100
+ concatSystemInputs = inputsSoFar : c :
101
+ addUnique c . buildInputs ( addUnique c . propagatedBuildInputs inputsSoFar ) ;
102
+ systemInputs' = lib . lists . foldl concatSystemInputs [ ] selectedComponents ;
103
+ systemInputs = removeSelectedInputs systemInputs' ;
104
+
97
105
nativeBuildInputs = removeSelectedInputs
98
106
( lib . concatMap ( c : c . executableToolDepends ) selectedComponents ) ;
99
107
You can’t perform that action at this time.
0 commit comments