diff options
author | lassulus <lass@aidsballs.de> | 2016-06-30 21:51:09 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-06-30 21:51:09 +0200 |
commit | b3fa9cbd7e4bc8fe950aed139d857a2f14775b94 (patch) | |
tree | 223af7528e038008bf8de4252dc986910f380f13 /krebs/4lib | |
parent | eac3b2f4b46c9046205bc2507cd8fab3840929bb (diff) | |
parent | 4d63548868ec4806d62d82337bb278e6dd34f21e (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/4lib')
-rw-r--r-- | krebs/4lib/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index afff17296..296748333 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -58,6 +58,10 @@ let out = rec { genAttrs' = names: f: listToAttrs (map f names); + getAttrs = names: set: + listToAttrs (map (name: nameValuePair name set.${name}) + (filter (flip hasAttr set) names)); + setAttr = name: value: set: set // { ${name} = value; }; optionalTrace = c: msg: x: if c then trace msg x else x; |