Write the unit config in a file
This commit is contained in:
parent
148c614540
commit
c7d2e2d866
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, bash
|
, bash
|
||||||
|
, writeText
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -35,6 +36,8 @@ let
|
|||||||
|
|
||||||
|
|
||||||
firstStage = (x: x.programPath) (elemAt linkStages 0);
|
firstStage = (x: x.programPath) (elemAt linkStages 0);
|
||||||
|
|
||||||
|
jsonConf = writeText "garlic_config.json" (builtins.toJSON conf);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "unit";
|
name = "unit";
|
||||||
@ -54,6 +57,9 @@ stdenv.mkDerivation {
|
|||||||
mkdir \$GARLIC_UNIT
|
mkdir \$GARLIC_UNIT
|
||||||
cd \$GARLIC_UNIT
|
cd \$GARLIC_UNIT
|
||||||
|
|
||||||
|
# Copy the configuration for the unit to the output path
|
||||||
|
cp ${jsonConf} garlic_config.json
|
||||||
|
|
||||||
# Finally, execute the first stage:
|
# Finally, execute the first stage:
|
||||||
exec ${firstStage}
|
exec ${firstStage}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user