Merge pull request #114853 from lourkeur/fix-string-escaping

nixos/kresd, nixos/dokuwiki, tests/fpm, build-bazel-package, libcutl: fix string escaping
This commit is contained in:
taku0 2021-03-03 19:35:16 +09:00 committed by GitHub
commit 61706fc470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View file

@ -8,9 +8,9 @@ let
# Convert systemd-style address specification to kresd config line(s).
# On Nix level we don't attempt to precisely validate the address specifications.
mkListen = kind: addr: let
al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
al_v6 = builtins.match "\\[(.\+)]:([0-9]\+)" addr;
al_portOnly = builtins.match "()([0-9]\+)" addr;
al_v4 = builtins.match "([0-9.]+):([0-9]+)" addr;
al_v6 = builtins.match "\\[(.+)]:([0-9]+)" addr;
al_portOnly = builtins.match "()([0-9]+)" addr;
al = findFirst (a: a != null)
(throw "services.kresd.*: incorrect address specification '${addr}'")
[ al_v4 al_v6 al_portOnly ];

View file

@ -329,7 +329,7 @@ in
extraConfig = "internal;";
};
locations."~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$" = {
locations."~ ^/lib.*\\.(js|css|gif|png|ico|jpg|jpeg)$" = {
extraConfig = "expires 365d;";
};
@ -349,7 +349,7 @@ in
'';
};
locations."~ \.php$" = {
locations."~ \\.php$" = {
extraConfig = ''
try_files $uri $uri/ /doku.php;
include ${pkgs.nginx}/conf/fastcgi_params;

View file

@ -10,7 +10,7 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: {
testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
in {
root = "${testdir}/web";
locations."~ \.php$".extraConfig = ''
locations."~ \\.php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools.foobar.socket};
fastcgi_index index.php;
include ${pkgs.nginx}/conf/fastcgi_params;

View file

@ -108,8 +108,8 @@ in stdenv.mkDerivation (fBuildAttrs // {
rm -rf $bazelOut/external/{bazel_tools,\@bazel_tools.marker}
${if removeRulesCC then "rm -rf $bazelOut/external/{rules_cc,\\@rules_cc.marker}" else ""}
rm -rf $bazelOut/external/{embedded_jdk,\@embedded_jdk.marker}
${if removeLocalConfigCc then "rm -rf $bazelOut/external/{local_config_cc,\@local_config_cc.marker}" else ""}
${if removeLocal then "rm -rf $bazelOut/external/{local_*,\@local_*.marker}" else ""}
${if removeLocalConfigCc then "rm -rf $bazelOut/external/{local_config_cc,\\@local_config_cc.marker}" else ""}
${if removeLocal then "rm -rf $bazelOut/external/{local_*,\\@local_*.marker}" else ""}
# Clear markers
find $bazelOut/external -name '@*\.marker' -exec sh -c 'echo > {}' \;

View file

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
license = licenses.mit;
};
majmin = builtins.head ( builtins.match "([[:digit:]]\.[[:digit:]]+)\.*" "${version}" );
majmin = builtins.head ( builtins.match "([[:digit:]]\\.[[:digit:]]+).*" "${version}" );
src = fetchurl {
url = "https://codesynthesis.com/download/${pname}/${majmin}/${pname}-${version}.tar.bz2";
sha256 = "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j";