Skip to content

Commit b501459

Browse files
committed
fix: dep group with conflicts and multi group
1 parent d8b9407 commit b501459

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/lock1.nix

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,15 @@ fix (self: {
254254
# can be merged into a single declaration.
255255
conflictMerged = lib.mapAttrs (_: lib.unique)
256256
(lib.zipAttrsWith (_: lib.flatten)
257-
(builtins.filter (c: 0 < builtins.length c.right) conflictsRes));
258-
right = conflictMerged.right or [];
259-
wrong = conflictMerged.wrong or [];
260-
deselected' =
261-
throwIf
262-
(length right > 1)
263-
"Conflict resolution selected more than one conflict specifier, resolution still ambigious: ${lib.concatMapStringsSep ", " builtins.toJSON right}"
264-
wrong;
257+
(builtins.filter (c: let
258+
matches = builtins.length c.right;
259+
in
260+
throwIf
261+
(matches > 1)
262+
"Conflict resolution selected more than one conflict specifier, resolution still ambigious: ${lib.concatMapStringsSep ", " builtins.toJSON c.right}"
263+
matches == 1
264+
) conflictsRes));
265+
deselected' = conflictMerged.wrong or [];
265266
deselected = groupBy (def: def.package) deselected';
266267
in
267268
lock

0 commit comments

Comments
 (0)