mirror of
https://github.com/nmattia/snack.git
synced 2024-11-28 12:27:41 +03:00
Fix nubbing
This commit is contained in:
parent
cb562a5996
commit
ee31bb94cb
@ -80,13 +80,12 @@ rec {
|
||||
allTransitiveImports = allTransitiveLists "moduleImports";
|
||||
|
||||
allTransitiveLists = attr: modSpecs:
|
||||
lib.lists.unique
|
||||
(
|
||||
foldDAG
|
||||
{ f = modSpec:
|
||||
lib.lists.foldl
|
||||
# calling "unique" is not super efficient but a set-based
|
||||
# approach breaks because not all values can be used as attribute
|
||||
# names (in particular strings referring to a store path)
|
||||
(x: y: lib.lists.unique (x ++ [y]))
|
||||
(x: y: x ++ [y])
|
||||
[] modSpec.${attr};
|
||||
empty = [];
|
||||
elemLabel = modSpec: modSpec.moduleName;
|
||||
@ -94,6 +93,7 @@ rec {
|
||||
elemChildren = modSpec: modSpec.moduleImports;
|
||||
}
|
||||
modSpecs
|
||||
)
|
||||
;
|
||||
|
||||
# Takes a package spec and returns (modSpecs -> Fold)
|
||||
|
Loading…
Reference in New Issue
Block a user