liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8ac2c6cec18151e13959db4c11c3d70106965250
parent 8879b2d1ba9b1b21fd0ed2b427128ae9a286fd4b
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 16 Mar 2024 23:08:59 +0000

support timeouts (default 30s) for starting s6-rc services

Diffstat:
Mpkgs/liminix-tools/services/builder.sh | 2+-
Mpkgs/liminix-tools/services/default.nix | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkgs/liminix-tools/services/builder.sh b/pkgs/liminix-tools/services/builder.sh @@ -11,7 +11,7 @@ test -n "$contents" && for d in $contents; do touch $out/${name}/contents.d/$d done -for i in run notification-fd up down consumer-for producer-for pipeline-name ; do +for i in timeout-up timeout-down run notification-fd up down consumer-for producer-for pipeline-name ; do test -n "$(printenv $i)" && (echo "$(printenv $i)" > $out/${name}/$i) done diff --git a/pkgs/liminix-tools/services/default.nix b/pkgs/liminix-tools/services/default.nix @@ -31,6 +31,8 @@ let , producer-for ? null , consumer-for ? null , pipeline-name ? null + , timeout-up ? 30000 # milliseconds + , timeout-down ? 0 , dependencies ? [] , contents ? [] , buildInputs ? [] @@ -39,7 +41,7 @@ let # we use stdenvNoCC to avoid generating derivations with names # like foo.service-mips-linux-musl inherit name serviceType up down run notification-fd - producer-for consumer-for pipeline-name; + producer-for consumer-for pipeline-name timeout-up timeout-down; buildInputs = buildInputs ++ dependencies ++ contents; dependencies = builtins.map (d: d.name) dependencies; contents = builtins.map (d: d.name) contents;