top-level: use parentheses to group checks
Group `throwIfNot` chains with parentheses to improve readability and
hint to nixfmt the intended formatting.
This makes the result visually closer to the pre-nixfmt layout:
checked =
throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list."
lib.foldr (x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.") (r: r) overlays
throwIfNot (lib.isList crossOverlays) "The crossOverlays argument to nixpkgs must be a list."
lib.foldr (x: throwIfNot (lib.isFunction x) "All crossOverlays passed to nixpkgs must be functions.") (r: r) crossOverlays
;
This commit is contained in:
@@ -79,17 +79,16 @@ let
|
|||||||
inherit (lib) throwIfNot;
|
inherit (lib) throwIfNot;
|
||||||
|
|
||||||
checked =
|
checked =
|
||||||
throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list." lib.foldr
|
(throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list.")
|
||||||
(x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.")
|
(lib.foldr (
|
||||||
(r: r)
|
x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions."
|
||||||
overlays
|
) lib.id overlays)
|
||||||
throwIfNot
|
(throwIfNot (lib.isList crossOverlays) "The crossOverlays argument to nixpkgs must be a list.")
|
||||||
(lib.isList crossOverlays)
|
(
|
||||||
"The crossOverlays argument to nixpkgs must be a list."
|
lib.foldr (
|
||||||
lib.foldr
|
x: throwIfNot (lib.isFunction x) "All crossOverlays passed to nixpkgs must be functions."
|
||||||
(x: throwIfNot (lib.isFunction x) "All crossOverlays passed to nixpkgs must be functions.")
|
) lib.id crossOverlays
|
||||||
(r: r)
|
);
|
||||||
crossOverlays;
|
|
||||||
|
|
||||||
localSystem = lib.systems.elaborate args.localSystem;
|
localSystem = lib.systems.elaborate args.localSystem;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user