diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-05-16 16:45:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 16:45:26 +0200 |
commit | 2ca9ba37bc17ba5c8d593cc203c0a4a0fe093e89 (patch) | |
tree | d65a7df618848d763390f818c52ce2c97ce594d5 /nixos | |
parent | 68392decde7a0f9319843d2db698bec12c9fca6d (diff) | |
parent | 083f211783cad8ac7463e5a395dac4aceedf193a (diff) |
Merge pull request #311299 from thenhnn/filesender-packaging-php-format
pkgs/formats: add generator for PHP config files
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/development/settings-options.section.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/settings-options.section.md b/nixos/doc/manual/development/settings-options.section.md index 806eee5637907..cedc82d32f89a 100644 --- a/nixos/doc/manual/development/settings-options.section.md +++ b/nixos/doc/manual/development/settings-options.section.md @@ -146,6 +146,27 @@ have a predefined type and string generator already declared under : Outputs the given attribute set as an Elixir map, instead of the default Elixir keyword list +`pkgs.formats.php { finalVariable }` []{#pkgs-formats-php} + +: A function taking an attribute set with values + + `finalVariable` + + : The variable that will store generated expression (usually `config`). If set to `null`, generated expression will contain `return`. + + It returns a set with PHP-Config-specific attributes `type`, `lib`, and + `generate` as specified [below](#pkgs-formats-result). + + The `lib` attribute contains functions to be used in settings, for + generating special PHP values: + + `mkRaw phpCode` + + : Outputs the given string as raw PHP code + + `mkMixedArray list set` + + : Creates PHP array that contains both indexed and associative values. For example, `lib.mkMixedArray [ "hello" "world" ] { "nix" = "is-great"; }` returns `['hello', 'world', 'nix' => 'is-great']` []{#pkgs-formats-result} These functions all return an attribute set with these values: |