File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 55
55
( builtins . map ( x : lib . nameValuePair ( x . name ) x )
56
56
( haskellLib . flatLibDepends { depends = directlySelectedComponents ; } ) ) ;
57
57
58
+ isSelectedComponent =
59
+ comp : selectedComponentsBitmap . "${ ( ( haskellLib . dependToLib comp ) . name or null ) } " or false ;
58
60
selectedComponentsBitmap =
59
61
lib . mapAttrs
60
- ( _ : x : ( builtins . any
61
- ( dep : selectedComponentsBitmap . "${ ( haskellLib . dependToLib dep ) . name } " ) x . config . depends ) )
62
+ ( _ : x : ( builtins . any isSelectedComponent x . config . depends ) )
62
63
transitiveDependenciesComponents
63
64
// builtins . listToAttrs ( map ( x : lib . nameValuePair x . name true ) directlySelectedComponents ) ; # base case
64
65
65
66
selectedComponents =
66
- lib . filter ( x : selectedComponentsBitmap . " ${ x . name } " ) ( lib . attrValues transitiveDependenciesComponents ) ;
67
+ lib . filter isSelectedComponent ( lib . attrValues transitiveDependenciesComponents ) ;
67
68
68
69
# Given a list of `depends`, removes those which are selected components
69
70
removeSelectedInputs =
70
- lib . filter ( input : ! ( selectedComponentsBitmap . " ${ ( ( haskellLib . dependToLib input ) . name or null ) } " or false ) ) ;
71
+ lib . filter ( input : ! ( isSelectedComponent input ) ) ;
71
72
72
73
# The configs of all the selected components
73
74
selectedConfigs = map ( c : c . config ) selectedComponents
Original file line number Diff line number Diff line change @@ -132,14 +132,7 @@ in {
132
132
## flatLibDepends :: Component -> [Package]
133
133
flatLibDepends = component :
134
134
let
135
- # this is a minor improvement over the "cannot coerce set to string"
136
- # error. It will now say:
137
- #
138
- # > The option `packages.Win32.package.identifier.name' is used but not defined.
139
- #
140
- # which indicates that the package.Win32 is missing and not defined.
141
- getKey = x : if x ? "outPath" then "${ x } " else ( throw x . identifier . name ) ;
142
- makePairs = map ( p : rec { key = getKey val ; val = ( p . components . library or p ) ; } ) ;
135
+ makePairs = map ( p : rec { key = val . name ; val = ( p . components . library or p ) ; } ) ;
143
136
closure = builtins . genericClosure {
144
137
startSet = makePairs component . depends ;
145
138
operator = { val , ...} : makePairs val . config . depends ;
You can’t perform that action at this time.
0 commit comments