diff options
Diffstat (limited to 'lib/eval-source.nix')
-rw-r--r-- | lib/eval-source.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/eval-source.nix b/lib/eval-source.nix new file mode 100644 index 000000000..de5f0b43c --- /dev/null +++ b/lib/eval-source.nix @@ -0,0 +1,17 @@ +with import <stockholm/lib>; +let + eval = _file: source: evalModules { + modules = singleton { + inherit _file; + options.source = mkOption { + type = types.attrsOf types.source; + default = {}; + }; + config = { + inherit source; + }; + }; + }; +in + # This function's return value can be used as pkgs.populate input. + _file: source: (eval _file source).config.source |