1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
Commit graph

7 commits

Author SHA1 Message Date
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
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 #100372
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 b6c540a87c
pkgs-lib: Implement settings formats for JSON, INI, YAML and TOML 2020-07-29 18:08:23 +02:00
Silvan Mosberger 888c923880
pkgs: Add pkgs-lib structure 2020-07-29 18:08:20 +02:00