build-support writers: add writeNginxConfig
This commit is contained in:
parent
3b7c3cbdd0
commit
7437268cd4
1 changed files with 10 additions and 0 deletions
|
@ -178,6 +178,16 @@ rec {
|
||||||
writeJSBin = name:
|
writeJSBin = name:
|
||||||
writeJS "/bin/${name}";
|
writeJS "/bin/${name}";
|
||||||
|
|
||||||
|
writeNginxConfig = name: text: pkgs.runCommand name {
|
||||||
|
inherit text;
|
||||||
|
passAsFile = [ "text" ];
|
||||||
|
} /* sh */ ''
|
||||||
|
cp "$textPath" $out
|
||||||
|
${pkgs.nginx-config-formatter}/bin/nginxfmt $out
|
||||||
|
${pkgs.gnused}/bin/sed -i '/^$/d' $out
|
||||||
|
${pkgs.gixy}/bin/gixy $out
|
||||||
|
'';
|
||||||
|
|
||||||
# writePerl takes a name an attributeset with libraries and some perl sourcecode and
|
# writePerl takes a name an attributeset with libraries and some perl sourcecode and
|
||||||
# returns an executable
|
# returns an executable
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue