2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 10:43:27 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
Martin Weinelt
1cdde769c8
Revert "pkgs.formats.toml: fix TOML semantics by upgrading tomlkit" 2023-07-27 18:55:56 +02:00
Luiz Ribeiro
ffb9b68bd3
pkgs.format.toml: introduce test for checking semantics 2023-07-27 09:40:41 -04:00
Francesco Gazzetta
0d2842a435 formats.keyValue: add tests 2022-06-20 22:36:29 +02:00
Robert Hensing
3c10819ecf
Merge pull request from hercules-ci/javaProperties-type-coercions
`formats.javaProperties`: add type coercions
2022-04-25 16:29:48 +02:00
zowoq
9233d33579 pkgs-lib.formats: fix tomlkit output 2022-04-18 17:14:55 +10:00
lassulus
d23b044959 tests formats: fix due to tomlkit output change 2022-04-10 09:06:11 -04:00
Robert Hensing
337c72b5cd pkgs.formats.javaProperties: Add type coercions
A usability improvement.
2022-04-04 14:24:15 +02:00
Robert Hensing
46156529f2 tests.pkgs-lib.formats: Allow strings with context in test runner 2022-04-04 14:22:22 +02:00
Robert Hensing
dcca8f5be2 tests.pkgs-lib.formats: Detect when impossible input is fed 2022-04-04 13:17:11 +02:00
Robert Hensing
9a0739cbe2 formats.javaProperties: Add comment 2022-04-01 15:19:45 +02:00
Robert Hensing
4f8e44394c formats.javaProperties: init 2022-04-01 15:19:45 +02:00
Silvan Mosberger
c511b4e1f9 formats: Fix yaml test
Faulty test result was introduced in https://github.com/NixOS/nixpkgs/pull/133807
2021-08-26 01:57:43 +02: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 .

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 ()
Allows coercing lists to values. E.g.

  formats.ini { listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault {}); }
2021-05-04 09:49:25 +02:00
Vladimír Čunát
a76152ac6e
pkgs-lib/tests/formats: improve message on failure
Foremost, the message was discarding double quotes on one side of the
diff, which was super-confusing to me, as I thought that the format
convertor broke that when in fact only whitespace was changed.

I thought I'd cat the files, but then... switching to `diff -u` seemed
self-sufficient.  It felt sufficiently non-controversial to push
directly, but certainly feel free to improve further.
2020-10-19 21:46:08 +02:00
Vladimír Čunát
92c96b7995
pkgs-lib/tests/formats: fix whitespace after PR
Naturally, TOML doesn't define the exact shape of everything.
nix build -f pkgs/top-level/release.nix pkgs-lib-tests
2020-10-19 21:19:37 +02:00
Silvan Mosberger
9c1565a042
pkgs-lib: Add tests for formats 2020-07-29 18:08:25 +02:00
Silvan Mosberger
888c923880
pkgs: Add pkgs-lib structure 2020-07-29 18:08:20 +02:00