parent
df9a370408
commit
82c8cb4b1f
24 changed files with 392 additions and 715 deletions
lib/attrs
|
@ -1,9 +1,20 @@
|
|||
{...}: let
|
||||
inherit (builtins) hasAttr isAttrs tryEval;
|
||||
inputsLib = import ../../inputs/lib.nix;
|
||||
in {
|
||||
inherit (inputsLib) recursiveUpdateList;
|
||||
{
|
||||
foldl,
|
||||
hasAttr,
|
||||
isAttrs,
|
||||
isList,
|
||||
mergeAttrsWithFunc,
|
||||
unique,
|
||||
...
|
||||
}: {
|
||||
inherit (import ../../inputs/lib.nix) recursiveUpdateList;
|
||||
|
||||
throws = x: !(tryEval x).success;
|
||||
throws = x: !(builtins.tryEval x).success;
|
||||
hasVersion = x: isAttrs x && hasAttr "version" x;
|
||||
mergeAttrsList = list:
|
||||
foldl (mergeAttrsWithFunc (a: b:
|
||||
if isList a && isList b
|
||||
then unique (a ++ b)
|
||||
else b)) {}
|
||||
list;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue