Merge branch 'master' into staging-next

This commit is contained in:
Vladimír Čunát
2020-10-31 14:30:44 +01:00
837 changed files with 11282 additions and 7038 deletions

View File

@@ -9,7 +9,7 @@ let
in
args@{
name
name ? "${args.pname}-${args.version}"
, bazel ? bazelPkg
, bazelFlags ? []
, bazelBuildFlags ? []

View File

@@ -77,13 +77,13 @@ let
done
fi
auto_mounts=""
declare -a auto_mounts
# loop through all directories in the root
for dir in /*; do
# if it is a directory and it is not in the blacklist
if [[ -d "$dir" ]] && grep -v "$dir" <<< "$blacklist" >/dev/null; then
# add it to the mount list
auto_mounts="$auto_mounts --bind $dir $dir"
auto_mounts+=(--bind "$dir" "$dir")
fi
done
@@ -97,7 +97,7 @@ let
--ro-bind /nix /nix \
${etcBindFlags} \
$ro_mounts \
$auto_mounts \
"''${auto_mounts[@]}" \
${init runScript}/bin/${name}-init ${initArgs}
'';

View File

@@ -57,7 +57,7 @@ let
suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
expand-response-params =
if buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null"
if (buildPackages.stdenv.hasCC or false) && buildPackages.stdenv.cc != "/dev/null"
then import ../expand-response-params { inherit (buildPackages) stdenv; }
else "";

View File

@@ -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