nixos-config/subprojects/wrapper-manager-fds/lib/env.nix
Gabriel Arazas 025b4f043a
wrapper-manager-fds/lib: make eval functions easier to import
This is to make wrapper-manager-fds easier to bootstrap whether used
with flakes or not.
2024-07-09 23:17:52 +08:00

23 lines
544 B
Nix

rec {
/* Given the attrset for evaluating a wrapper-manager module, return a
derivation containing the wrapper.
*/
build = args:
(eval args).config.build.toplevel;
/* Evaluate a wrapper-manager configuration. */
eval = {
pkgs,
lib ? pkgs.lib,
modules ? [ ],
specialArgs ? { },
}:
lib.evalModules {
modules = [ ../modules/wrapper-manager ] ++ modules;
specialArgs = specialArgs // {
inherit pkgs;
modulesPath = builtins.toString ../modules/wrapper-manager;
};
};
}