mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 13:39:15 +03:00
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:
parent
3ea16e98b4
commit
d9123a2329
6 changed files with 110 additions and 107 deletions
|
@ -164,8 +164,10 @@ rec {
|
||||||
in y ++ go (tail xs) (y ++ acc);
|
in y ++ go (tail xs) (y ++ acc);
|
||||||
in go inputList acc;
|
in go inputList acc;
|
||||||
|
|
||||||
uniqListExt = {inputList, outputList ? [],
|
uniqListExt = { inputList,
|
||||||
getter ? (x : x), compare ? (x: y: x==y)}:
|
outputList ? [],
|
||||||
|
getter ? (x: x),
|
||||||
|
compare ? (x: y: x==y) }:
|
||||||
if inputList == [] then outputList else
|
if inputList == [] then outputList else
|
||||||
let x = head inputList;
|
let x = head inputList;
|
||||||
isX = y: (compare (getter y) (getter x));
|
isX = y: (compare (getter y) (getter x));
|
||||||
|
@ -176,8 +178,6 @@ rec {
|
||||||
inherit getter compare;
|
inherit getter compare;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
condConcat = name: list: checker:
|
condConcat = name: list: checker:
|
||||||
if list == [] then name else
|
if list == [] then name else
|
||||||
if checker (head list) then
|
if checker (head list) then
|
||||||
|
@ -346,7 +346,10 @@ rec {
|
||||||
# See misc.nix -> versionedDerivation
|
# See misc.nix -> versionedDerivation
|
||||||
# discussion: nixpkgs: pull/310
|
# discussion: nixpkgs: pull/310
|
||||||
mergeAttrsByVersion = name: version: attrsByVersion: base:
|
mergeAttrsByVersion = name: version: attrsByVersion: base:
|
||||||
mergeAttrsByFuncDefaultsClean [ { name = "${name}-${version}"; } base (maybeAttr version (throw "bad version ${version} for ${name}") attrsByVersion)];
|
mergeAttrsByFuncDefaultsClean [ { name = "${name}-${version}"; }
|
||||||
|
base
|
||||||
|
(maybeAttr version (throw "bad version ${version} for ${name}") attrsByVersion)
|
||||||
|
];
|
||||||
|
|
||||||
# sane defaults (same name as attr name so that inherit can be used)
|
# sane defaults (same name as attr name so that inherit can be used)
|
||||||
mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
|
mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue