From c2f3556dc75ee09890c2cfc867cdb10df23accf6 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 26 Jan 2021 22:30:07 +0100 Subject: lib/tests: More functionTo tests --- lib/tests/modules/functionTo/trivial.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/tests/modules/functionTo/trivial.nix (limited to 'lib/tests/modules/functionTo/trivial.nix') diff --git a/lib/tests/modules/functionTo/trivial.nix b/lib/tests/modules/functionTo/trivial.nix new file mode 100644 index 00000000000..0962a0cf893 --- /dev/null +++ b/lib/tests/modules/functionTo/trivial.nix @@ -0,0 +1,17 @@ +{ lib, config, ... }: +let + inherit (lib) types; +in { + options = { + fun = lib.mkOption { + type = types.functionTo types.str; + }; + + result = lib.mkOption { + type = types.str; + default = config.fun "input"; + }; + }; + + config.fun = input: "input is ${input}"; +} -- cgit 1.4.1