2022-09-20 00:51:38 +02:00
|
|
|
source $stdenv/setup
|
|
|
|
mkdir -p $out/${name}
|
2022-09-26 12:46:09 +02:00
|
|
|
echo $serviceType > $out/${name}/type
|
2022-09-20 00:51:38 +02:00
|
|
|
mkdir -p $out/${name}/dependencies.d
|
|
|
|
echo $buildInputs > $out/buildInputs
|
2022-09-22 01:10:55 +02:00
|
|
|
test -n "$dependencies" && for d in $dependencies; do
|
2022-09-20 00:51:38 +02:00
|
|
|
touch $out/${name}/dependencies.d/$d
|
|
|
|
done
|
2022-09-22 01:10:55 +02:00
|
|
|
test -n "$contents" && for d in $contents; do
|
2022-09-20 00:51:38 +02:00
|
|
|
mkdir -p $out/${name}/contents.d
|
|
|
|
touch $out/${name}/contents.d/$d
|
|
|
|
done
|
2023-03-05 00:08:25 +01:00
|
|
|
|
2024-05-13 18:45:07 +02:00
|
|
|
for i in timeout-up timeout-down run notification-fd up down finish consumer-for producer-for pipeline-name restart-on-upgrade; do
|
2023-03-05 00:08:25 +01:00
|
|
|
test -n "$(printenv $i)" && (echo "$(printenv $i)" > $out/${name}/$i)
|
|
|
|
done
|
|
|
|
|
2024-02-13 22:41:43 +01:00
|
|
|
( cd $out && ln -s /run/services/outputs/${name} ./.outputs )
|
2022-09-22 01:10:55 +02:00
|
|
|
for i in $out/${name}/{down,up,run} ; do test -f $i && chmod +x $i; done
|
|
|
|
true
|