3
0
Fork 0
forked from mirrors/nixpkgs

lib/types: add description for functionTo

This commit is contained in:
Fritz Otlinghaus 2021-01-31 13:28:23 +01:00
parent 4015c5ca9c
commit e0215b3175
No known key found for this signature in database
GPG key ID: 1E5F98946FB1444E

View file

@ -454,7 +454,8 @@ rec {
};
functionTo = elemType: mkOptionType {
name = "function that evaluates to a(n) ${elemType.name}";
name = "functionTo";
description = "function that evaluates to a(n) ${elemType.name}";
check = isFunction;
merge = loc: defs:
fnArgs: (mergeDefinitions (loc ++ [ "[function body]" ]) elemType (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs)).mergedValue;