Commit Graph

19 Commits

Author SHA1 Message Date
benaryorg
8b2d86b982
pkgs.formats: toINIWithGlobalSection wrapper
The new format is based on the existing wrapper and generates an INI file with an unnamed global section at the top as is used by *stunnel* for instance.
Technically the INI format is a subset of this however testing, type checking, and API guarantees profit from two separate generators.

Co-authored-by: tim-tx <tim-tx@users.noreply.github.com>
Signed-off-by: benaryorg <binary@benary.org>
2024-02-12 17:58:48 +00:00
h7x4
2554eba2ca
formats.hocon: init 2024-02-09 16:40:22 +01:00
Minijackson
ad586e6beb formats.systemd: init INI-style systemd config file format 2023-12-09 01:50:23 +01:00
ckie
5707d01df2
pkgs-lib.formats: add note about missing pkgs quirk 2023-10-27 18:32:23 +02:00
h7x4
3530342dcc
formats.libconfig: init
Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>
Signed-off-by: h7x4 <h7x4@nani.wtf>
2023-10-27 18:32:22 +02:00
Minijackson
2cb6dc90ac formats.pythonVars: init 2023-04-04 11:45:29 +02:00
Aaron Andersen
1cab362206
Merge pull request #178365 from fgaz/lib.formats.keyValue
lib.formats.keyValue: init
2022-07-01 00:11:34 +02:00
Ben Wolsieffer
14b01120c1 pkgs-lib: fix JSON, YAML and TOML cross-compilation
Splicing of nativeBuildInputs doesn't work unless callPackage is used, so
the generators were attempting to use host platform tools at build time.
2022-06-19 22:50:01 -04:00
Francesco Gazzetta
3ff9245301 lib.formats.keyValue: init 2022-06-18 21:11:14 +02:00
Sandro Jäckel
43d4ddf28e
treewide: remove usage of runCommandNoCC aliases 2022-06-07 16:57:06 +02:00
Silvan Mosberger
fd50826952
Merge pull request #104457 from ju1m/public-inbox
Update public-inbox to 1.8.0 and add systemd services
2022-05-12 20:46:39 +02:00
Julien Moutinho
8514800c42 nixos/public-inbox: init 2022-05-12 01:56:15 +02:00
Robert Hensing
4f8e44394c formats.javaProperties: init 2022-04-01 15:19:45 +02:00
Minijackson
6a96ddb675 pkgs-lib: Implement settings format for Elixir 2022-02-28 07:09:10 -05:00
lucasew
83514ae7a9 lib.formats.yaml: use well known YAML format
The way `(lib.formats.yaml {}).generate` generates YAML is compliant
because on YAML 1.2 spec JSON is a subset of YAML but it bugs people's
minds and can lead to problems with software that is not compatible with
YAML 1.2.

This commit also changes the test of the generation function. Data
validation/typing remains the same.

See #133802.

Signed-off-by: lucasew <lucas59356@gmail.com>
2021-08-25 14:02:59 +02:00
Robert Hensing
fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
Ben Wolsieffer
98336c223b pkgs-lib: allow paths in TOML, YAML and JSON
Paths get automatically added to the store. The INI generator currently chokes
on paths, so it is not supported for now.
2021-06-28 11:59:03 -04:00
Silvan Mosberger
b8336c2b8a
formats.ini: Introduce listToValue argument (#121613)
Allows coercing lists to values. E.g.

  formats.ini { listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault {}); }
2021-05-04 09:49:25 +02:00
Silvan Mosberger
b6c540a87c
pkgs-lib: Implement settings formats for JSON, INI, YAML and TOML 2020-07-29 18:08:23 +02:00