Commit Graph

48 Commits

Author SHA1 Message Date
h7x4
312a2fb08d pkgs-lib/hocon: use structuredAttrs instead of passAsFile (#530354) 2026-08-11 11:50:06 +00:00
h7x4
9aa527f9fe formats.libconfig: use structuredAttrs instead of passAsFile (#530357) 2026-07-28 14:06:07 +00:00
h7x4
d5bf3451a7 formats.javaProperties: use structuredAttrs instead of passAsFile (#530355) 2026-07-22 17:57:14 +00:00
Stefan Frijters
10561f335e java-properties: move env variable into env for structuredAttrs (#524094) 2026-07-06 15:28:53 +00:00
nixpkgs-ci[bot]
b3d68622a1 Merge master into staging-nixos 2026-06-24 00:41:40 +00:00
Yuriy Taraday
efdeeebcb9 Reapply "pkgs-lib/formats: Use .attrs.json where possible"
This expands on https://github.com/NixOS/nixpkgs/pull/498928 that
introduced __structuredAttrs here by actually using data in
`.attrs.json` when it makes sense, instead of relying on environment
variables.

This reverts commit bf6ada5d78.
This reapplies commit 691dc02df0.
2026-06-23 22:01:42 +02:00
Yuriy Taraday
f995f8cca8 Reapply "pkgs-lib/formats: Use .attrs.json directly for TOML"
This reverts commit 36709df191.
2026-06-23 18:26:12 +02:00
Pol Dellaiera
29c66c6eaa pkgs.formats.configobj: init
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2026-06-16 20:58:27 +02:00
Stefan Frijters
3cb8b0787d formats.javaProperties: use structuredAttrs instead of passAsFile in test 2026-06-10 15:34:37 +02:00
Stefan Frijters
ed9cec9d25 formats.libconfig: use structuredAttrs instead of passAsFile
Also use finalAttrs pattern instead of rec.

Tested via `nix-build -A tests.pkgs-lib.libconfig`
2026-06-10 15:21:40 +02:00
Stefan Frijters
dfde99fd70 formats.javaProperties: use structuredAttrs instead of passAsFile
Tested via `nix-build -A tests.pkgs-lib.java-properties`
2026-06-10 15:19:48 +02:00
Stefan Frijters
5cb5028d2d pkgs-lib/hocon: use structuredAttrs instead of passAsFile
Also use finalAttrs pattern.

Tested via `nix-build -A tests.pkgs-lib.hocon`
2026-06-10 15:16:34 +02:00
Matt Sturgeon
36709df191 Revert "pkgs-lib/formats: Use .attrs.json directly for TOML" 2026-06-10 13:30:28 +01:00
Yuriy Taraday
1cc9c0cf12 pkgs-lib/formats: Use .attrs.json directly for TOML
A spinoff from https://github.com/NixOS/nixpkgs/pull/524404.
Add `--unwrap` argument to json2x, just like json2yaml has.
2026-06-05 15:50:45 +02:00
figsoda
701d8bd46b pkgs-lib/formats: reimplement toml.generate with Rust 2026-05-28 12:07:54 -04:00
zimbatm
edb4b053f5 pkgs.formats.javaProperties: use lib.sources.sourceByGlobs
Uses the cleaner expression
2026-05-26 21:49:00 +12:00
Sigmanificient
287994f163 java-properties: move env variable into env for structuredAttrs 2026-05-25 18:37:28 +02:00
uku
21e7ccb126 formats.javaProperties: fix cross-compilation 2025-12-06 17:54:57 +01:00
Wolfgang Walther
91a8fee3aa treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
h7x4
9670af4242 pkgs-lib/hocon: separate includes from the following fields (#420239) 2025-08-20 17:31:28 +03:00
name_snrl
935f232934 pkgs-lib/hocon: separate includes from the following fields 2025-08-20 16:19:00 +02:00
h7x4
d6041cc2ca pkgs-lib/hocon: fix type for _includes 2025-03-24 21:33:35 +01:00
piegames
591861f2b1 treewide: Fix invalid string escapes 2024-12-14 15:19:03 +01:00
Silvan Mosberger
4f0dadbf38 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 a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Alexander Braverman Masis
fe48be2ab5 formats.libconfig: add support for dashes 2024-11-27 10:15:21 -05:00
Wolfgang Walther
97c3fa4ebd hocon: remove deprecated indicators
This was scheduled for 24.11.
2024-11-23 19:37:39 +01:00
Artturin
7a199f5dd6 nixos/doc: add documentation for formats.hocon and formats.libconfig (#320339) 2024-09-10 18:26:10 +03:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
éclairevoyant
2d71c78890 formats.hocon: fix typo 2024-07-23 12:07:07 -04:00
h7x4
bf2adb82b7 nixos/doc: move implementation notes for formats.libconfig to docs 2024-06-16 20:58:50 +02:00
h7x4
141a8a6c86 nixos/doc: move implementation notes for formats.hocon to docs 2024-06-16 20:58:48 +02:00
nicoo
6475c4c4b0 formats.javaProperties: Don't set !allowSubstitutes in generate builder 2024-05-25 17:30:40 +00:00
nicoo
3fa359407e formats: Set preferLocalBuild in generate builders
Otherwise, remote builds are used for trivial format conversions.
2024-05-25 17:27:40 +00:00
Sigmanificient
a2353716f6 treewide: remove unused occurence of fetchurl argument 2024-05-20 05:20:23 +02:00
Pol Dellaiera
2ca9ba37bc Merge pull request #311299 from thenhnn/filesender-packaging-php-format
pkgs/formats: add generator for PHP config files
2024-05-16 16:45:26 +02:00
nhnn
083f211783 pkgs: add PHP to formats.nix 2024-05-16 13:07:34 +03:00
Philip Taron
25f91c20b6 formats.hocon: fix typo: compatability to compatibility 2024-04-02 14:49:46 -07:00
h7x4
0e65eca7c6 formats.hocon: add backwards compatibility 2024-02-09 18:49:04 +01:00
h7x4
b6cdfec16c formats.hocon: add tests 2024-02-09 16:40:22 +01:00
h7x4
2554eba2ca formats.hocon: init 2024-02-09 16:40:22 +01:00
ckie
faf4e7b2dc formats.libconfig: fix unstable store path dependency in test
Previously, this test would verify a writeText file with a constant
content is at a precise store path, but this is not actually the case
and the store path has changed maybe twice since the original
"pkgs.formats: Add libconfig format generator" PR was started, the
latest time being after it was merged.

We now placehold the store path in expected.txt and substitute it just
before we run the diff, alleviating the problem.
2023-10-31 16:50:54 +02:00
h7x4
18ca8b21e2 formats.libconfig: add tests
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
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
Robert Hensing
62d781f09b tests.pkgs-lib: Fix for darwin 2022-04-04 14:41:40 +02:00
Robert Hensing
337c72b5cd pkgs.formats.javaProperties: Add type coercions
A usability improvement.
2022-04-04 14:24:15 +02:00
Robert Hensing
ef6d9dfd71 pkgs.formats.javaProperties: Add implementation note to type 2022-04-04 13:11:00 +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