add s6-rc-up-tree: start reverse deps of controlled service

When s6-rc stops a service, it also stops everything that
depends on it. but when it starts a service it starts only
that service, so we have to go through the other services
depending on it and figure out if they should be started too.
This commit is contained in:
Daniel Barlow
2024-06-15 14:59:34 +01:00
parent 1d337588f9
commit 49d1703428
8 changed files with 60 additions and 4 deletions

View File

@@ -8,17 +8,21 @@
, fennel
, stdenv
, fennelrepl
, s6-rc-up-tree
, makeWrapper
}:
stdenv.mkDerivation {
name = "uevent-watch";
src = ./.;
nativeBuildInputs = [ fennelrepl ];
nativeBuildInputs = [ fennelrepl makeWrapper ];
propagatedBuildInputs = [ s6-rc-up-tree ];
installPhase = ''
mkdir -p $out/bin
cp -p ${writeFennel "uevent-watch" {
packages = [fennel anoia nellie lualinux];
mainFunction = "run";
} ./watch.fnl} $out/bin/uevent-watch
wrapProgram $out/bin/uevent-watch --prefix PATH : "${s6-rc-up-tree}/bin"
'';
checkPhase = ''
fennelrepl ./test.fnl