nix-processmgmt/nixproc/backends/supervisord/test-module/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2021-03-31 20:41:48 +00:00
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
inherit (pkgs) lib;
};
processesEnvProcessManager = import ../../sysvinit/build-sysvinit-env.nix ({
inherit pkgs system;
exprFile = ./processes-supervisord.nix;
} // profileSettings.params);
processesEnvSystem = import ../build-supervisord-env.nix ({
2021-03-31 20:41:48 +00:00
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
in
{
inherit (profileSettings) params;
nixosModules = [];
systemPackages = [
tools.sysvinit
tools.supervisord
2022-05-31 16:43:34 +00:00
pkgs.python3Packages.supervisor
];
additionalPaths = [ processesEnvProcessManager processesEnvSystem ];
deployProcessManager = ''
machine.succeed(
"${executeDeploy { inherit profileSettings; processManager = "sysvinit"; processesEnv = processesEnvProcessManager; }}"
)
machine.wait_for_open_port(9001)
'';
deploySystem = ''
machine.succeed(
"${executeDeploy { inherit profileSettings; processManager = "supervisord"; envVars = [ "SUPERVISORD_CONF_DIR=${profileSettings.params.stateDir}/lib/supervisord" ]; processesEnv = processesEnvSystem; }}"
)
'';
}