diff options
author | Elis Hirwing <elis@hirwing.se> | 2021-06-26 09:46:46 +0200 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2021-06-26 20:07:56 +0200 |
commit | 94d07b7492416e2f6b8c18f229d1c13f4f48349c (patch) | |
tree | 4cd91c4a0673273f0131e6a0a1b5d0dd8240a736 /nixos/tests | |
parent | 42cadf5a768c81d912adba037d30c39d09f326c7 (diff) | |
download | nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.gz nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.bz2 nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.lz nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.xz nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.tar.zst nixlib-94d07b7492416e2f6b8c18f229d1c13f4f48349c.zip |
php: Run nixpkgs-fmt on all php related files
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/php/default.nix | 5 | ||||
-rw-r--r-- | nixos/tests/php/fpm.nix | 32 | ||||
-rw-r--r-- | nixos/tests/php/httpd.nix | 18 | ||||
-rw-r--r-- | nixos/tests/php/pcre.nix | 20 |
4 files changed, 41 insertions, 34 deletions
diff --git a/nixos/tests/php/default.nix b/nixos/tests/php/default.nix index cf78c9db53b7..c0386385753f 100644 --- a/nixos/tests/php/default.nix +++ b/nixos/tests/php/default.nix @@ -1,5 +1,5 @@ { system ? builtins.currentSystem -, config ? {} +, config ? { } , pkgs ? import ../../.. { inherit system config; } , php ? pkgs.php }: @@ -8,7 +8,8 @@ let php' = php.buildEnv { extensions = { enabled, all }: with all; enabled ++ [ apcu ]; }; -in { +in +{ fpm = import ./fpm.nix { inherit system pkgs; php = php'; }; httpd = import ./httpd.nix { inherit system pkgs; php = php'; }; pcre = import ./pcre.nix { inherit system pkgs; php = php'; }; diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix index b11f85d39cb6..31a79bb4dbe3 100644 --- a/nixos/tests/php/fpm.nix +++ b/nixos/tests/php/fpm.nix @@ -1,4 +1,4 @@ -import ../make-test-python.nix ({pkgs, lib, php, ...}: { +import ../make-test-python.nix ({ pkgs, lib, php, ... }: { name = "php-${php.version}-fpm-nginx-test"; meta.maintainers = lib.teams.php.members; @@ -8,21 +8,23 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { services.nginx = { enable = true; - virtualHosts."phpfpm" = let - testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();"; - in { - root = "${testdir}/web"; - locations."~ \\.php$".extraConfig = '' - fastcgi_pass unix:${config.services.phpfpm.pools.foobar.socket}; - fastcgi_index index.php; - include ${pkgs.nginx}/conf/fastcgi_params; - include ${pkgs.nginx}/conf/fastcgi.conf; - ''; - locations."/" = { - tryFiles = "$uri $uri/ index.php"; - index = "index.php index.html index.htm"; + virtualHosts."phpfpm" = + let + testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();"; + in + { + root = "${testdir}/web"; + locations."~ \\.php$".extraConfig = '' + fastcgi_pass unix:${config.services.phpfpm.pools.foobar.socket}; + fastcgi_index index.php; + include ${pkgs.nginx}/conf/fastcgi_params; + include ${pkgs.nginx}/conf/fastcgi.conf; + ''; + locations."/" = { + tryFiles = "$uri $uri/ index.php"; + index = "index.php index.html index.htm"; + }; }; - }; }; services.phpfpm.pools."foobar" = { diff --git a/nixos/tests/php/httpd.nix b/nixos/tests/php/httpd.nix index a5ca9b3c5d1f..36d90e72d7d1 100644 --- a/nixos/tests/php/httpd.nix +++ b/nixos/tests/php/httpd.nix @@ -1,4 +1,4 @@ -import ../make-test-python.nix ({pkgs, lib, php, ...}: { +import ../make-test-python.nix ({ pkgs, lib, php, ... }: { name = "php-${php.version}-httpd-test"; meta.maintainers = lib.teams.php.members; @@ -6,14 +6,16 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { services.httpd = { enable = true; adminAddr = "admin@phpfpm"; - virtualHosts."phpfpm" = let - testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();"; - in { - documentRoot = "${testdir}/web"; - locations."/" = { - index = "index.php index.html"; + virtualHosts."phpfpm" = + let + testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();"; + in + { + documentRoot = "${testdir}/web"; + locations."/" = { + index = "index.php index.html"; + }; }; - }; phpPackage = php; enablePHP = true; }; diff --git a/nixos/tests/php/pcre.nix b/nixos/tests/php/pcre.nix index 97572f63af33..917184b975ec 100644 --- a/nixos/tests/php/pcre.nix +++ b/nixos/tests/php/pcre.nix @@ -1,6 +1,7 @@ let testString = "can-use-subgroups"; -in import ../make-test-python.nix ({lib, php, ...}: { +in +import ../make-test-python.nix ({ lib, php, ... }: { name = "php-${php.version}-httpd-pcre-jit-test"; meta.maintainers = lib.teams.php.members; @@ -12,14 +13,15 @@ in import ../make-test-python.nix ({lib, php, ...}: { phpPackage = php; enablePHP = true; phpOptions = "pcre.jit = true"; - extraConfig = let - testRoot = pkgs.writeText "index.php" - '' - <?php - preg_match('/(${testString})/', '${testString}', $result); - var_dump($result); - ''; - in + extraConfig = + let + testRoot = pkgs.writeText "index.php" + '' + <?php + preg_match('/(${testString})/', '${testString}', $result); + var_dump($result); + ''; + in '' Alias / ${testRoot}/ |