Remove uses of the "merge" option attribute
It's redundant because you can (and should) specify an option type, or an apply function.
This commit is contained in:
@@ -66,6 +66,9 @@ rec {
|
||||
then head list
|
||||
else throw "Cannot merge values.";
|
||||
|
||||
|
||||
/* Obsolete, will remove soon. Specify an option type or apply
|
||||
function instead. */
|
||||
mergeTypedOption = typeName: predicate: merge: list:
|
||||
if all predicate list then merge list
|
||||
else throw "Expect a ${typeName}.";
|
||||
|
||||
@@ -71,6 +71,12 @@ rec {
|
||||
merge = lib.concatStringsSep "\n";
|
||||
};
|
||||
|
||||
commas = mkOptionType {
|
||||
name = "string";
|
||||
check = builtins.isString;
|
||||
merge = lib.concatStringsSep ",";
|
||||
};
|
||||
|
||||
envVar = mkOptionType {
|
||||
name = "environment variable";
|
||||
inherit (string) check;
|
||||
|
||||
Reference in New Issue
Block a user