lol

lixPackageSets.git: 2.94.0-pre-20250807_8bbd5e1d0df9 -> 2.94.0-pre-20250912_d90e4a65812c

+213 -8
+11 -5
pkgs/tools/package-management/lix/common-lix.nix
··· 26 26 boehmgc, 27 27 boost, 28 28 brotli, 29 + busybox, 29 30 busybox-sandbox-shell, 30 31 bzip2, 31 32 callPackage, ··· 140 141 # python3.withPackages does not splice properly, see https://github.com/NixOS/nixpkgs/issues/305858 141 142 (buildPackages.python3.withPackages ( 142 143 p: 143 - [ 144 - p.python-frontmatter 145 - p.toml 146 - ] 144 + [ p.python-frontmatter ] 145 + ++ lib.optionals (lib.versionOlder version "2.94") [ p.toml ] 147 146 ++ lib.optionals finalAttrs.doInstallCheck [ 148 147 p.aiohttp 149 148 p.pytest ··· 203 202 ] 204 203 ++ lib.optionals hasExternalLixDoc [ lix-doc ] 205 204 ++ lib.optionals (!isLegacyParser) [ pegtl ] 205 + ++ lib.optionals (lib.versionOlder version "2.94") [ libsodium ] 206 206 # NOTE(Raito): I'd have expected that the LLVM packaging would inject the 207 207 # libunwind library path directly in the wrappers, but it does inject 208 208 # -lunwind without injecting the library path... ··· 286 286 ] 287 287 ++ lib.optionals stdenv.hostPlatform.isLinux [ 288 288 (lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox") 289 - ]; 289 + ] 290 + ++ 291 + lib.optionals 292 + (stdenv.hostPlatform.isLinux && finalAttrs.doInstallCheck && lib.versionAtLeast version "2.94") 293 + [ 294 + (lib.mesonOption "build-test-shell" "${busybox}/bin") 295 + ]; 290 296 291 297 ninjaFlags = [ "-v" ]; 292 298
+10 -3
pkgs/tools/package-management/lix/default.nix
··· 166 166 attrName = "git"; 167 167 168 168 lix-args = rec { 169 - version = "2.94.0-pre-20250807_${builtins.substring 0 12 src.rev}"; 169 + version = "2.94.0-pre-20250912_${builtins.substring 0 12 src.rev}"; 170 170 171 171 src = fetchFromGitea { 172 172 domain = "git.lix.systems"; 173 173 owner = "lix-project"; 174 174 repo = "lix"; 175 - rev = "8bbd5e1d0df9c31b4d86ba07bc85beb952e42ccb"; 176 - hash = "sha256-P+WiN95OjCqHhfygglS/VOFTSj7qNdL5XQDo2wxhQqg="; 175 + rev = "d90e4a65812c6d3dd90aed7e44941eba3215f876"; 176 + hash = "sha256-rbf0ptj4BTSwsitKQu3FuaiJwhNDePGBeBJovm5HLdQ="; 177 177 }; 178 + 179 + patches = [ 180 + # Bumping to toml11 ≥4.0.0 makes integer parsing throw (as it should) instead of saturate on overflow. 181 + # However, the updated version is not in nixpkgs yet, and the released versions still have the saturation bug. 182 + # Hence reverting the bump for now seems to be the least bad option. 183 + ./revert-toml11-bump.patch 184 + ]; 178 185 179 186 cargoDeps = rustPlatform.fetchCargoVendor { 180 187 name = "lix-${version}";
+192
pkgs/tools/package-management/lix/revert-toml11-bump.patch
··· 1 + diff --git a/doc/manual/rl-next/toml-number-overflow.md b/doc/manual/rl-next/toml-number-overflow.md 2 + deleted file mode 100644 3 + index 1522213cb4..0000000000 4 + --- a/doc/manual/rl-next/toml-number-overflow.md 5 + +++ /dev/null 6 + @@ -1,14 +0,0 @@ 7 + ---- 8 + -synopsis: Reject overflowing TOML integer literals 9 + -issues: [] 10 + -cls: [3916] 11 + -category: "Breaking Changes" 12 + -credits: [emilazy] 13 + ---- 14 + - 15 + -The toml11 library used by Lix was updated. The new 16 + -version aligns with the [TOML v1.0.0 specification’s 17 + -requirement](https://toml.io/en/v1.0.0#integer) to reject integer 18 + -literals that cannot be losslessly parsed. This means that code like 19 + -`builtins.fromTOML "v=0x8000000000000000"` will now produce an error 20 + -rather than silently saturating the integer result. 21 + diff --git a/lix/libexpr/primops/fromTOML.cc b/lix/libexpr/primops/fromTOML.cc 22 + index 9d4b5e6abf..3e26773eac 100644 23 + --- a/lix/libexpr/primops/fromTOML.cc 24 + +++ b/lix/libexpr/primops/fromTOML.cc 25 + @@ -65,10 +65,13 @@ 26 + val, 27 + toml::parse( 28 + tomlStream, 29 + - "fromTOML", /* the "filename" */ 30 + + "fromTOML" /* the "filename" */ 31 + +#if HAVE_TOML11_4 32 + + , 33 + toml::spec::v( 34 + 1, 0, 0 35 + ) // Be explicit that we are parsing TOML 1.0.0 without extensions 36 + +#endif 37 + ) 38 + ); 39 + } catch (std::exception & e) { // NOLINT(lix-foreign-exceptions) // TODO: toml::syntax_error 40 + diff --git a/meson.build b/meson.build 41 + index 7b229ccefb..d4a36eb285 100644 42 + --- a/meson.build 43 + +++ b/meson.build 44 + @@ -363,7 +363,10 @@ 45 + dependency('gmock_main', required : enable_tests, include_type : 'system'), 46 + ] 47 + 48 + -toml11 = dependency('toml11', version : '>=4.0.0', required : true, method : 'cmake', include_type : 'system') 49 + +toml11 = dependency('toml11', version : '>=3.7.0', required : true, method : 'cmake', include_type : 'system') 50 + +configdata += { 51 + + 'HAVE_TOML11_4': toml11.version().version_compare('>= 4.0.0').to_int(), 52 + +} 53 + 54 + pegtl = dependency( 55 + 'pegtl', 56 + diff --git a/misc/toml11.nix b/misc/toml11.nix 57 + deleted file mode 100644 58 + index c53be3da1b..0000000000 59 + --- a/misc/toml11.nix 60 + +++ /dev/null 61 + @@ -1,47 +0,0 @@ 62 + -{ 63 + - lib, 64 + - stdenv, 65 + - fetchFromGitHub, 66 + - cmake, 67 + -}: 68 + - 69 + -stdenv.mkDerivation (finalAttrs: { 70 + - pname = "toml11"; 71 + - version = "4.4.0"; 72 + - 73 + - src = fetchFromGitHub { 74 + - owner = "ToruNiina"; 75 + - repo = "toml11"; 76 + - rev = "v${finalAttrs.version}"; 77 + - hash = "sha256-sgWKYxNT22nw376ttGsTdg0AMzOwp8QH3E8mx0BZJTQ="; 78 + - }; 79 + - 80 + - nativeBuildInputs = [ 81 + - cmake 82 + - ]; 83 + - 84 + - meta = with lib; { 85 + - homepage = "https://github.com/ToruNiina/toml11"; 86 + - description = "TOML for Modern C++"; 87 + - longDescription = '' 88 + - toml11 is a C++11 (or later) header-only toml parser/encoder depending 89 + - only on C++ standard library. 90 + - 91 + - - It is compatible to the latest version of TOML v1.0.0. 92 + - - It is one of the most TOML standard compliant libraries, tested with 93 + - the language agnostic test suite for TOML parsers by BurntSushi. 94 + - - It shows highly informative error messages. 95 + - - It has configurable container. You can use any random-access containers 96 + - and key-value maps as backend containers. 97 + - - It optionally preserves comments without any overhead. 98 + - - It has configurable serializer that supports comments, inline tables, 99 + - literal strings and multiline strings. 100 + - - It supports user-defined type conversion from/into toml values. 101 + - - It correctly handles UTF-8 sequences, with or without BOM, both on posix 102 + - and Windows. 103 + - ''; 104 + - license = licenses.mit; 105 + - maintainers = with maintainers; [ ]; 106 + - platforms = platforms.unix ++ platforms.windows; 107 + - }; 108 + -}) 109 + diff --git a/package.nix b/package.nix 110 + index eb0e5c602a..c1c948ee7e 100644 111 + --- a/package.nix 112 + +++ b/package.nix 113 + @@ -55,8 +55,6 @@ 114 + rustc, 115 + sqlite, 116 + systemtap-lix ? __forDefaults.systemtap-lix, 117 + - # FIXME: remove default after dropping NixOS 25.05 118 + - toml11-lix ? __forDefaults.toml11-lix, 119 + toml11, 120 + util-linuxMinimal ? utillinuxMinimal, 121 + utillinuxMinimal ? null, 122 + @@ -117,9 +115,6 @@ 123 + build-release-notes = callPackage ./maintainers/build-release-notes.nix { }; 124 + 125 + passt-lix = callPackage ./misc/passt.nix { }; 126 + - 127 + - toml11-lix = 128 + - if lib.versionOlder toml11.version "4.4.0" then callPackage ./misc/toml11.nix { } else toml11; 129 + }, 130 + }: 131 + 132 + @@ -344,7 +339,7 @@ 133 + libarchive 134 + boost 135 + lowdown 136 + - toml11-lix 137 + + toml11 138 + pegtl 139 + capnproto 140 + dtrace-headers 141 + diff --git a/tests/functional2/lang/fromTOML-overflowing/eval-fail-overflow.err.exp b/tests/functional2/lang/fromTOML-overflowing/eval-fail-overflow.err.exp 142 + deleted file mode 100644 143 + index 0c90e85edf..0000000000 144 + --- a/tests/functional2/lang/fromTOML-overflowing/eval-fail-overflow.err.exp 145 + +++ /dev/null 146 + @@ -1,13 +0,0 @@ 147 + -error: 148 + - … while calling the 'fromTOML' builtin 149 + - at /pwd/in.nix:1:1: 150 + - 1| builtins.fromTOML ''attr = 9223372036854775808'' 151 + - | ^ 152 + - 2| 153 + - 154 + - error: while parsing TOML: [error] toml::parse_dec_integer: too large integer: current max digits = 2^63 155 + - --> fromTOML 156 + - | 157 + - 1 | attr = 9223372036854775808 158 + - | ^-- must be < 2^63 159 + - 160 + diff --git a/tests/functional2/lang/fromTOML-overflowing/eval-fail-underflow.err.exp b/tests/functional2/lang/fromTOML-overflowing/eval-fail-underflow.err.exp 161 + deleted file mode 100644 162 + index a287e18655..0000000000 163 + --- a/tests/functional2/lang/fromTOML-overflowing/eval-fail-underflow.err.exp 164 + +++ /dev/null 165 + @@ -1,13 +0,0 @@ 166 + -error: 167 + - … while calling the 'fromTOML' builtin 168 + - at /pwd/in.nix:1:1: 169 + - 1| builtins.fromTOML ''attr = -9223372036854775809'' 170 + - | ^ 171 + - 2| 172 + - 173 + - error: while parsing TOML: [error] toml::parse_dec_integer: too large integer: current max digits = 2^63 174 + - --> fromTOML 175 + - | 176 + - 1 | attr = -9223372036854775809 177 + - | ^-- must be < 2^63 178 + - 179 + diff --git a/tests/functional2/lang/fromTOML-overflowing/eval-okay-overflow.out.exp b/tests/functional2/lang/fromTOML-overflowing/eval-okay-overflow.out.exp 180 + new file mode 100644 181 + index 0000000000..e241ca9ba4 182 + --- /dev/null 183 + +++ b/tests/functional2/lang/fromTOML-overflowing/eval-okay-overflow.out.exp 184 + @@ -0,0 +1,1 @@ 185 + +{ attr = 9223372036854775807; } 186 + diff --git a/tests/functional2/lang/fromTOML-overflowing/eval-okay-underflow.out.exp b/tests/functional2/lang/fromTOML-overflowing/eval-okay-underflow.out.exp 187 + new file mode 100644 188 + index 0000000000..83b822591f 189 + --- /dev/null 190 + +++ b/tests/functional2/lang/fromTOML-overflowing/eval-okay-underflow.out.exp 191 + @@ -0,0 +1,1 @@ 192 + +{ attr = -9223372036854775808; }