summaryrefslogtreecommitdiffstats
path: root/lib/eval-source.nix
blob: de5f0b43cec953807c3539e57a08231f5fb8c288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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