From d72cff76c8d64e983c13f2b61851eb5509e99ab1 Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Wed, 17 Jun 2026 00:35:41 +0100 Subject: [PATCH] writers.writeNginxConfig: fix cross compilation --- pkgs/build-support/writers/scripts.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/writers/scripts.nix b/pkgs/build-support/writers/scripts.nix index 01afb249d407..eabffa1117cb 100644 --- a/pkgs/build-support/writers/scripts.nix +++ b/pkgs/build-support/writers/scripts.nix @@ -6,6 +6,7 @@ makeBinaryWrapper, mkNugetDeps, mkNugetSource, + nginx-config-formatter, pkgs, stdenv, }: @@ -1101,11 +1102,14 @@ rec { { inherit text; __structuredAttrs = true; - nativeBuildInputs = [ gixy ]; + nativeBuildInputs = [ + gixy + nginx-config-formatter + ]; } # sh '' - printf "%s" "$text" | ${lib.getExe pkgs.nginx-config-formatter} --max-empty-lines 0 - > $out - ${lib.getExe pkgs.gnused} -i 's/ ;/;/g' $out + printf "%s" "$text" | nginxfmt --max-empty-lines 0 - > $out + sed -i 's/ ;/;/g' $out gixy $out || (echo "\n\nThis can be caused by combining multiple incompatible services on the same hostname.\n\nFull merged config:\n\n"; cat $out; exit 1) '';