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;
|
||||
|
||||
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;
|
||||
(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."
|
||||
) lib.id 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."
|
||||
) lib.id crossOverlays
|
||||
);
|
||||
|
||||
localSystem = lib.systems.elaborate args.localSystem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user