PortValhalla/lib/eval-module.nix

17 lines
432 B
Nix
Raw Normal View History

let
inherit (nixpkgs) lib;
nixpkgs = import <nixpkgs> { config = {}; overlay = []; };
file = (builtins.getEnv "FILE");
property = (builtins.getEnv "PROPERTY");
processor = if (builtins.stringLength property > 0)
then
(_: lib.attrsets.getAttrFromPath (lib.strings.splitString "." property) _)
else
(_: _);
in
processor (lib.evalModules {
modules = [
(import file)
];
}).config