| Commit message (Expand) | Author | Age | Files | Lines |
| * | treewide: apply nixfmt 1.2.0 | Dyego Aurélio | 2026-01-22 | 1 | -1/+1 |
| * | tests.pkgs-lib: expose the tests included in it | jopejoe1 | 2025-12-08 | 1 | -6/+8 |
| * | pkgs.formats.plist: don't test path•••Reference: https://hydra.nixos.org/build/310233987/nixlog/1/tail
| Sizhe Zhao | 2025-10-17 | 1 | -3/+0 |
| * | pkgs.formats.plist: init | Sizhe Zhao | 2025-10-06 | 1 | -0/+78 |
| * | pkgs-lib/pythonVars: add test | h7x4 | 2025-09-18 | 1 | -0/+57 |
| * | formats: add `nixConf`•••adds `nixConf` (to generate `nix.conf` files) as a file format to
`lib.formats`, and uses it for serializing `nix.settings`.
this makes it easier to 'manually' serialize `nix.settings`, which is
relevant in e.g. safely handling sensitive values such as that of
`nix.settings.access-tokens`.
Signed-off-by: cinereal <cinereal@riseup.net>
| cinereal | 2025-09-06 | 1 | -0/+25 |
| * | formats tests: drop jdk8 and add default jdk•••It was weird to keep testing an ancient version
but not test the default one. Now jdk8 has issues:
https://hydra.nixos.org/build/301885710#tabs-buildsteps
| Vladimír Čunát | 2025-07-11 | 1 | -1/+1 |
| * | pkgs/pkgs-lib/tests/formats.nix: adapt to new style•••https://hydra.nixos.org/build/300150957/nixlog/2/tail
Probably caused by f80b06e
| Vladimír Čunát | 2025-06-17 | 1 | -0/+1 |
| * | pkgs.formats.yaml_1_2: init•••Same as YAML 1.1 but relies on the unpinned remarshal version which emits
YAML 1.2.
| Martin Weinelt | 2025-06-11 | 1 | -1/+35 |
| * | treewide: Format all Nix files•••Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
| Silvan Mosberger | 2025-04-01 | 1 | -137/+278 |
| * | formats.lua: init•••Add a lua format, based on `lib.generators.toLua`.
| Matt Sturgeon | 2025-03-19 | 1 | -0/+76 |
| * | pkgs-lib: Make tests independent of Nix file contents•••Before, all of these tests would be rebuilt whenever formats.nix is
modified, but there's no need for this :)
| Silvan Mosberger | 2025-02-17 | 2 | -6/+6 |
| * | pkgs-lib.formats.xml: init | Felix Buehler | 2025-01-13 | 1 | -0/+27 |
| * | pkgs.formats: add cdn | uku | 2025-01-06 | 1 | -0/+34 |
| * | treewide: format all inactive Nix files•••After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
| Silvan Mosberger | 2024-12-10 | 1 | -22/+33 |
| * | pkgs/lib/formats: test more explicitly for YAML 1.1 compat | Martin Weinelt | 2024-11-09 | 1 | -1/+5 |
| * | formats.ini: disable merging as list by default•••Previously, setting listsAsDuplicateKeys or listToValue would make it so
merging these treat all values as lists, by coercing non-lists via
lib.singleton. Some programs (such as gamemode; see #345121), allow some
values to be repeated but not others, which can lead to unexpected
behavior when non-list values are merged like this rather than throwing
an error.
This now makes that behavior opt-in via the mergeAsList option. Setting
mergeAsList (to either true or false) without setting either
listsAsDuplicateKeys or listToValue is an error, since lists are
meaningless in this case.
| MithicSpirit | 2024-10-10 | 1 | -0/+137 |
| * | pkgs: add PHP to formats.nix | nhnn | 2024-05-16 | 1 | -0/+44 |
| * | 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>
| benaryorg | 2024-02-12 | 1 | -0/+95 |
| * | pkgs.formats: negative type checking tests•••Tests using `shouldFail` (new) enable testing for whether the type system catches any unintended uses (missing parameters or unavailable data types in the format).
It should not be necessary to test for all possible outliers for each format, however format-specific tests (for instance those using a rigid submodule structure) can ensure that common mistakes err out instead of being silently discarded, while also allowing test-driven development of sorts.
Signed-off-by: benaryorg <binary@benary.org>
| benaryorg | 2024-02-12 | 1 | -37/+117 |
| * | formats.hocon: add tests | h7x4 | 2024-02-09 | 1 | -0/+3 |
| * | formats.libconfig: add tests•••Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>
Signed-off-by: h7x4 <h7x4@nani.wtf>
| h7x4 | 2023-10-27 | 1 | -0/+1 |
| * | pkgs-lib/tests/formats: fix expected output | K900 | 2023-08-27 | 1 | -1/+0 |
| * | formats.keyValue: add tests | Francesco Gazzetta | 2022-06-20 | 1 | -0/+45 |
| * | Merge pull request #167172 from hercules-ci/javaProperties-type-coercions•••`formats.javaProperties`: add type coercions | Robert Hensing | 2022-04-25 | 1 | -4/+21 |
| |\ |
|
| | * | pkgs.formats.javaProperties: Add type coercions•••A usability improvement.
| Robert Hensing | 2022-04-04 | 1 | -2/+16 |
| | * | tests.pkgs-lib.formats: Allow strings with context in test runner | Robert Hensing | 2022-04-04 | 1 | -2/+5 |
| * | | pkgs-lib.formats: fix tomlkit output | zowoq | 2022-04-18 | 1 | -0/+1 |
| * | | tests formats: fix due to tomlkit output change | lassulus | 2022-04-10 | 1 | -3/+0 |
| |/ |
|
| * | tests.pkgs-lib.formats: Detect when impossible input is fed | Robert Hensing | 2022-04-04 | 1 | -1/+5 |
| * | formats.javaProperties: Add comment | Robert Hensing | 2022-04-01 | 1 | -0/+2 |
| * | formats.javaProperties: init | Robert Hensing | 2022-04-01 | 2 | -5/+60 |
| * | formats: Fix yaml test•••Faulty test result was introduced in https://github.com/NixOS/nixpkgs/pull/133807
| Silvan Mosberger | 2021-08-26 | 1 | -2/+2 |
| * | 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>
| lucasew | 2021-08-25 | 1 | -15/+11 |
| * | treewide: runCommandNoCC -> runCommand•••This has been synonymous for ~5y.
| Robert Hensing | 2021-08-15 | 1 | -1/+1 |
| * | 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.
| Ben Wolsieffer | 2021-06-28 | 1 | -0/+4 |
| * | formats.ini: Introduce `listToValue` argument (#121613)•••Allows coercing lists to values. E.g.
formats.ini { listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault {}); } | Silvan Mosberger | 2021-05-04 | 1 | -0/+16 |
| * | 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.
| Vladimír Čunát | 2020-10-19 | 1 | -4/+4 |
| * | 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
| Vladimír Čunát | 2020-10-19 | 1 | -2/+0 |
| * | pkgs-lib: Add tests for formats | Silvan Mosberger | 2020-07-29 | 2 | -0/+159 |
| * | pkgs: Add pkgs-lib structure | Silvan Mosberger | 2020-07-29 | 1 | -0/+5 |