lib.eval-source: sanitize source

This commit is contained in:
tv 2017-07-22 23:34:47 +02:00
parent 297065f98c
commit 29ae8b026c

View File

@ -10,6 +10,12 @@ let
}; };
}; };
}; };
sanitize = x: getAttr (typeOf x) {
set = mapAttrs
(const sanitize)
(filterAttrs (name: value: name != "_module" && value != null) x);
string = x;
};
in in
# This function's return value can be used as pkgs.populate input. # This function's return value can be used as pkgs.populate input.
_file: source: (eval _file source).config.source _file: source: sanitize (eval _file source).config.source