summaryrefslogtreecommitdiffstats
path: root/pkgs/pkgs-lib
AgeCommit message (Collapse)Author
2024-05-25formats.javaProperties: Don't set `!allowSubstitutes` in `generate` buildernicoo
2024-05-25formats: Set `preferLocalBuild` in `generate` buildersnicoo
Otherwise, remote builds are used for trivial format conversions.
2024-05-20treewide: remove unused occurence of fetchurl argumentSigmanificient
2024-05-16Merge pull request #311299 from thenhnn/filesender-packaging-php-formatPol Dellaiera
pkgs/formats: add generator for PHP config files
2024-05-16pkgs: add PHP to formats.nixnhnn
2024-04-02formats.hocon: fix typo: compatability to compatibilityPhilip Taron
2024-02-12pkgs.formats: toINIWithGlobalSection wrapperbenaryorg
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-12pkgs.formats: negative type checking testsbenaryorg
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>
2024-02-09formats.hocon: add backwards compatibilityh7x4
2024-02-09formats.hocon: add testsh7x4
2024-02-09formats.hocon: inith7x4
2023-12-09formats.systemd: init INI-style systemd config file formatMinijackson
2023-10-31formats.libconfig: fix unstable store path dependency in testckie
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-27pkgs-lib.formats: add note about missing `pkgs` quirkckie
2023-10-27formats.libconfig: add testsh7x4
Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com> Signed-off-by: h7x4 <h7x4@nani.wtf>
2023-10-27formats.libconfig: inith7x4
Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com> Signed-off-by: h7x4 <h7x4@nani.wtf>
2023-08-27pkgs-lib/tests/formats: fix expected outputK900
2023-04-04formats.pythonVars: initMinijackson
2022-07-01Merge pull request #178365 from fgaz/lib.formats.keyValueAaron Andersen
lib.formats.keyValue: init
2022-06-20formats.keyValue: add testsFrancesco Gazzetta
2022-06-19pkgs-lib: fix JSON, YAML and TOML cross-compilationBen Wolsieffer
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-18lib.formats.keyValue: initFrancesco Gazzetta
2022-06-07treewide: remove usage of runCommandNoCC aliasesSandro Jäckel
2022-05-12Merge pull request #104457 from ju1m/public-inboxSilvan Mosberger
Update public-inbox to 1.8.0 and add systemd services
2022-05-12nixos/public-inbox: initJulien Moutinho
2022-04-25Merge pull request #167172 from hercules-ci/javaProperties-type-coercionsRobert Hensing
`formats.javaProperties`: add type coercions
2022-04-18pkgs-lib.formats: fix tomlkit outputzowoq
2022-04-10tests formats: fix due to tomlkit output changelassulus
2022-04-04tests.pkgs-lib: Fix for darwinRobert Hensing
2022-04-04pkgs.formats.javaProperties: Add type coercionsRobert Hensing
A usability improvement.
2022-04-04tests.pkgs-lib.formats: Allow strings with context in test runnerRobert Hensing
2022-04-04tests.pkgs-lib.formats: Detect when impossible input is fedRobert Hensing
2022-04-04pkgs.formats.javaProperties: Add implementation note to typeRobert Hensing
2022-04-01formats.javaProperties: Add commentRobert Hensing
2022-04-01formats.javaProperties: initRobert Hensing
2022-02-28pkgs-lib: Implement settings format for ElixirMinijackson
2021-08-26formats: Fix yaml testSilvan Mosberger
Faulty test result was introduced in https://github.com/NixOS/nixpkgs/pull/133807
2021-08-25lib.formats.yaml: use well known YAML formatlucasew
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-15treewide: runCommandNoCC -> runCommandRobert Hensing
This has been synonymous for ~5y.
2021-06-28pkgs-lib: allow paths in TOML, YAML and JSONBen Wolsieffer
Paths get automatically added to the store. The INI generator currently chokes on paths, so it is not supported for now.
2021-05-04formats.ini: Introduce `listToValue` argument (#121613)Silvan Mosberger
Allows coercing lists to values. E.g. formats.ini { listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault {}); }
2020-10-19pkgs-lib/tests/formats: improve message on failureVladimír Čunát
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-19pkgs-lib/tests/formats: fix whitespace after PR #100372Vladimír Čunát
Naturally, TOML doesn't define the exact shape of everything. nix build -f pkgs/top-level/release.nix pkgs-lib-tests
2020-07-29pkgs-lib: Add tests for formatsSilvan Mosberger
2020-07-29pkgs-lib: Implement settings formats for JSON, INI, YAML and TOMLSilvan Mosberger
2020-07-29pkgs: Add pkgs-lib structureSilvan Mosberger