diff options
Diffstat (limited to 'nixpkgs/lib/tests/modules/functionTo/trivial.nix')
-rw-r--r-- | nixpkgs/lib/tests/modules/functionTo/trivial.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nixpkgs/lib/tests/modules/functionTo/trivial.nix b/nixpkgs/lib/tests/modules/functionTo/trivial.nix new file mode 100644 index 000000000000..0962a0cf893d --- /dev/null +++ b/nixpkgs/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}"; +} |