lib: fix mixed tab/space indents, trailing whitespace, etc

Nix style seems to have settled on not using spaces between bound
variable names and the lambda : so I also tried to make those somewhat
more consistent throughout.
This commit is contained in:
Benjamin Staffin
2017-03-11 17:39:40 -05:00
parent 3ea16e98b4
commit d9123a2329
6 changed files with 110 additions and 107 deletions

View File

@@ -114,7 +114,7 @@ rec {
/* Massage a module into canonical form, that is, a set consisting
of options, config and imports attributes. */
unifyModuleSyntax = file: key: m:
let metaSet = if m ? meta
let metaSet = if m ? meta
then { meta = m.meta; }
else {};
in
@@ -595,7 +595,7 @@ rec {
functionality
This show a warning if any a.b.c or d.e.f is set, and set the value of
x.y.z to the result of the merge function
x.y.z to the result of the merge function
*/
mkMergedOptionModule = from: to: mergeFn:
{ config, options, ... }:
@@ -611,12 +611,12 @@ rec {
let val = getAttrFromPath f config;
opt = getAttrFromPath f options;
in
optionalString
optionalString
(val != "_mkMergedOptionModule")
"The option `${showOption f}' defined in ${showFiles opt.files} has been changed to `${showOption to}' that has a different type. Please read `${showOption to}' documentation and update your configuration accordingly."
) from);
} // setAttrByPath to (mkMerge
(optional
(optional
(any (f: (getAttrFromPath f config) != "_mkMergedOptionModule") from)
(mergeFn config)));
};