summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-10-30 12:45:04 +0100
committerGitHub <noreply@github.com>2020-10-30 12:45:04 +0100
commitd420c85a5593866939e5fe72ee9396bbf271bc92 (patch)
tree759c6d9c5fb1538a7215a4a57de41fc9829241e4
parent557094a10c5f570631e1f91f92078f1d7e0f107a (diff)
parent43662810755ce7814c5398ee6551ea337cb40403 (diff)
Merge pull request #102123 from lopsided98/nginx-conf-cross
writers.writeNginxConfig: fix cross-compilation
-rw-r--r--pkgs/build-support/writers/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix
index 495a56b41974..9c709921d210 100644
--- a/pkgs/build-support/writers/default.nix
+++ b/pkgs/build-support/writers/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib }:
+{ pkgs, lib, gawk, gnused, gixy }:
with lib;
rec {
@@ -219,10 +219,11 @@ rec {
writeNginxConfig = name: text: pkgs.runCommandLocal name {
inherit text;
passAsFile = [ "text" ];
+ nativeBuildInputs = [ gawk gnused gixy ];
} /* sh */ ''
# nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16
- ${pkgs.gawk}/bin/awk -f ${awkFormatNginx} "$textPath" | ${pkgs.gnused}/bin/sed '/^\s*$/d' > $out
- ${pkgs.gixy}/bin/gixy $out
+ awk -f ${awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out
+ gixy $out
'';
# writePerl takes a name an attributeset with libraries and some perl sourcecode and