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
|
2022-09-22 01:10:55 +02:00
|
|
|
test -n "$run" && (echo -e "#!$shell\n$run" > $out/${name}/run)
|
2022-09-25 22:06:08 +02:00
|
|
|
test -n "${notificationFd}" && (echo ${notificationFd} > $out/${name}/notification-fd)
|
2022-09-22 01:10:55 +02:00
|
|
|
test -n "$up" && (echo -e "#!$shell\n$up" > $out/${name}/up)
|
|
|
|
test -n "$down" && (echo -e "#!$shell\n$down" > $out/${name}/down)
|
|
|
|
for i in $out/${name}/{down,up,run} ; do test -f $i && chmod +x $i; done
|
|
|
|
true
|
|
|
|
# (echo $out/${name} && cd $out/${name} && find . -ls)
|