Files
lix/misc/toml11.nix
T
4de09b6b54 packaging: bump toml11 to 4.4.0
This version changes the handling of TOML timestamps, and throws an
error on out‐of‐range integer literals rather than the previous
saturating behaviour, as required by [the TOML v1.0.0 specification]:

> Arbitrary 64-bit signed integers (from −2^63 to 2^63−1) should be
> accepted and handled losslessly. If an integer cannot be represented
> losslessly, an error must be thrown.

[the TOML v1.0.0 specification]: <https://toml.io/en/v1.0.0#integer>

The only known use of this is a questionable Nixpkgs test that I have
proposed [a fix] for.

[a fix]: <https://github.com/NixOS/nixpkgs/pull/433710>

Bumping this ahead of Nixpkgs ensures we can test these cases on
HEAD in advance. I presume that the next Lix major version will be
released after 25.05 goes out of support, so it should be fine to
drop support for the old version of toml11.

The co‐authors of this commit are the contributors to the vendored
package definition from Nixpkgs.

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
Co-authored-by: Artturin <Artturin@artturin.com>
Co-authored-by: Silvan Mosberger <silvan.mosberger@moduscreate.com>
Change-Id: I6a6a69644a188b6e09eee5c9cf91ddd3c81d24ee
2025-08-16 14:27:13 +01:00

48 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "toml11";
version = "4.4.0";
src = fetchFromGitHub {
owner = "ToruNiina";
repo = "toml11";
rev = "v${finalAttrs.version}";
hash = "sha256-sgWKYxNT22nw376ttGsTdg0AMzOwp8QH3E8mx0BZJTQ=";
};
nativeBuildInputs = [
cmake
];
meta = with lib; {
homepage = "https://github.com/ToruNiina/toml11";
description = "TOML for Modern C++";
longDescription = ''
toml11 is a C++11 (or later) header-only toml parser/encoder depending
only on C++ standard library.
- It is compatible to the latest version of TOML v1.0.0.
- It is one of the most TOML standard compliant libraries, tested with
the language agnostic test suite for TOML parsers by BurntSushi.
- It shows highly informative error messages.
- It has configurable container. You can use any random-access containers
and key-value maps as backend containers.
- It optionally preserves comments without any overhead.
- It has configurable serializer that supports comments, inline tables,
literal strings and multiline strings.
- It supports user-defined type conversion from/into toml values.
- It correctly handles UTF-8 sequences, with or without BOM, both on posix
and Windows.
'';
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.unix ++ platforms.windows;
};
})