PortValhalla/lib/eval-attribute.nix

15 lines
374 B
Nix
Raw Permalink Normal View History

2024-09-08 15:09:01 +00:00
let
inherit (nixpkgs) lib;
2024-10-06 19:25:34 +00:00
nixpkgs = import <nixpkgs> {
config = { };
overlay = [ ];
};
2024-09-08 15:09:01 +00:00
property = (builtins.getEnv "PROPERTY");
2024-11-29 00:13:58 +00:00
processor =
if (builtins.stringLength property > 0) then
(_: lib.attrsets.getAttrFromPath (lib.strings.splitString "." property) _)
else
(_: _);
in
_: processor (lib.evalModules { modules = [ _ ]; }).config