krebs lib += getAttrDef
This commit is contained in:
parent
fb82aa8f34
commit
e6657cd46a
|
@ -41,6 +41,7 @@ let out = rec {
|
|||
mapAttrs (name: _: path + "/${name}")
|
||||
(filterAttrs (_: eq "directory") (readDir path));
|
||||
|
||||
getAttrDef = name: set: set.${name} or set.default or null;
|
||||
mapAttrValues = f: mapAttrs (_: f);
|
||||
setAttr = name: value: set: set // { ${name} = value; };
|
||||
|
||||
|
|
Loading…
Reference in a new issue