diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-10-29 20:22:29 -0400 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-10-29 21:39:22 -0400 |
commit | 43662810755ce7814c5398ee6551ea337cb40403 (patch) | |
tree | 4c2ac77523811dfa6f6c36164bea1995a052e197 /pkgs/build-support/writers/default.nix | |
parent | e6a40af16c9bb8ec403a0084d145c5e8ec5e2337 (diff) | |
download | nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar.gz nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar.bz2 nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar.lz nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar.xz nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.tar.zst nixpkgs-43662810755ce7814c5398ee6551ea337cb40403.zip |
writers.writeNginxConfig: fix cross-compilation
Native versions of awk, sed and gixy need to be used.
Diffstat (limited to 'pkgs/build-support/writers/default.nix')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 495a56b4197..9c709921d21 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 |