diff options
author | lassulus <lassulus@lassul.us> | 2017-07-12 19:11:29 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-07-12 19:11:29 +0200 |
commit | b19ebc2abd8f383d477d35040e833cd9c05319ab (patch) | |
tree | 778a882e0faebc82360c06165b4b00726468b8aa /lib/eval-source.nix | |
parent | 5efedd139a20d71268af2afd069dbd595414650f (diff) | |
parent | cd47613a4d8daf185f4ac0f8ef43af11985a2f65 (diff) |
Merge branch 'staging/source'
Diffstat (limited to 'lib/eval-source.nix')
-rw-r--r-- | lib/eval-source.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/eval-source.nix b/lib/eval-source.nix new file mode 100644 index 000000000..468fc92d1 --- /dev/null +++ b/lib/eval-source.nix @@ -0,0 +1,15 @@ +with import <stockholm/lib>; +let + eval = _file: source: evalModules { + modules = singleton { + inherit _file; + imports = map (source: { inherit source; }) (toList source); + options.source = mkOption { + type = types.attrsOf types.source; + default = {}; + }; + }; + }; +in + # This function's return value can be used as pkgs.populate input. + _file: source: (eval _file source).config.source |