Commit Graph

5275 Commits

Author SHA1 Message Date
Eman Resu
2221cbb4aa lib.lists: remove assertMsg usage
assertMsg sends our error message through a function call, even if the
error condition doesn't trigger. This requires a lot of thunk allocation
that can be easily avoided.
2026-06-30 21:38:22 -04:00
Eman Resu
370135bdc8 lib.generators: remove assertMsg usage
assertMsg sends our error message through a function call, even if the
error condition doesn't trigger. This requires a lot of thunk allocation
that can be easily avoided.
2026-06-30 21:37:46 -04:00
nixpkgs-ci[bot]
d8a7dfa41f Merge master into staging-next 2026-06-30 00:44:58 +00:00
Jörg Thalheim
f53d98faed nixVersions: drop nix_2_28 and nix_2_30 (#536372) 2026-06-29 19:46:45 +00:00
nixpkgs-ci[bot]
0d28c0688f Merge master into staging-next 2026-06-29 15:34:33 +00:00
Eman Resu
14234b49ba lib.sources.fromSourceAttributes: don't filter if no conditions passed 2026-06-29 09:30:56 -04:00
Eman Resu
22842dedee lib.sources.toSourceAttributes: default filter to null 2026-06-29 09:30:47 -04:00
Eman Resu
f2b8637f79 lib.sources.cleanSourceFilter: partially apply checks 2026-06-29 09:30:46 -04:00
Jörg Thalheim
7d940ca082 nixVersions.nix_2_28: remove
Nix 2.28 was the last release packaged with the monolithic
common-meson.nix expression and is no longer maintained upstream.
Drop it together with the now-unused common-meson.nix and nix-perl.nix
helpers and the storeDir/stateDir/confDir plumbing that only fed
that code path.
2026-06-28 20:50:31 +03:00
Eman Resu
554c4ea776 lib.sources: inherit lib functions to global scope 2026-06-27 16:57:39 -04:00
Emily
af8b1be8bb lib/tests/misc: use x86_64-freebsd instead of x86_64-darwin 2026-06-26 07:58:16 +01:00
nixpkgs-ci[bot]
f5a1befabc Merge staging-next into staging 2026-06-25 18:46:42 +00:00
Pol Dellaiera
ba44c4a4be licenses: add Reticulum License 2026-06-25 13:37:39 +02:00
nixpkgs-ci[bot]
3bd1331aeb Merge staging-next into staging 2026-06-25 00:45:52 +00:00
Emily
777104e276 lib.lists: performance improvements (#522834) 2026-06-25 00:01:13 +00:00
Eman Resu
442c1d9296 lib.attrsets.mapAttrsRecursive: beta reduce 2026-06-24 18:34:50 -04:00
Eman Resu
ebbae9566a lib.attrsets.getFirstOutput: avoid builtins lookup 2026-06-24 18:34:39 -04:00
Eman Resu
24b77159de lib.attrsets.getFirstOutput: use ? instead of hasAttr 2026-06-24 18:34:26 -04:00
Eman Resu
26ddb0d857 lib.attrsets.getFirstOutput: inline variable 2026-06-24 18:34:24 -04:00
Eman Resu
4b623fa2b8 lib.lists.reverseList: avoid subtraction 2026-06-24 18:30:03 -04:00
Eman Resu
4e2f331f87 lib.lists.toposort: avoid reversing element causing a cycle 2026-06-24 18:29:22 -04:00
Eman Resu
7d2f66c0ad lib.lists.toposort: avoid extra function calls while recursing 2026-06-24 18:29:21 -04:00
Eman Resu
099a322b3a lib.lists.listDfs: compare to [] instead of checking length 2026-06-24 18:29:21 -04:00
Eman Resu
0f096eb287 lib.lists.flatten: save function call when recursing 2026-06-24 18:29:21 -04:00
Eman Resu
986cf9adb8 lib.lists.init: rewrite to not call take 2026-06-24 18:29:21 -04:00
Eman Resu
09b8cbd5d9 lib.lists.dropEnd: rewrite to not use sublist 2026-06-24 18:29:21 -04:00
Eman Resu
bb3308e01e lib.lists.takeEnd: rewrite to not call sublist 2026-06-24 18:29:20 -04:00
Eman Resu
3621649b19 lib.lists.drop: rewrite to not call sublist 2026-06-24 18:29:20 -04:00
Eman Resu
097288cc6f lib.lists.take: rewrite to not call sublist 2026-06-24 18:29:20 -04:00
Eman Resu
261b8489a0 lib.lists.foldl': avoid builtins lookups 2026-06-24 18:29:20 -04:00
Emily
0666870242 lib.strings: small performance cleanups (#519085) 2026-06-24 21:31:39 +00:00
Eman Resu
ff92c9d15a lib.strings.cmakeFeature: beta reduce 2026-06-24 17:16:57 -04:00
Eman Resu
4755ddd126 lib.strings.{toSentenceCase,toCamelCase}: don't add context unnecessarily
builtins.substring doesn't destroy context - it's not necessary to add
it back.
2026-06-24 17:16:57 -04:00
Eman Resu
f9c9f70a40 lib.strings.cmakeBool: inline two function calls
I can live with a function like boolToString being used, but if we're
immediately modifying its output, we should homeroll it.
2026-06-24 17:16:56 -04:00
Eman Resu
184d899ccf lib.strings: remove duplicate cmake and meson assertions
These are already performed by cmakeOptionType and mesonOption - doing
them twice isn't necessary.
2026-06-24 17:16:56 -04:00
Eman Resu
a709ca8240 lib.strings.splitString: compute escaped separator early
Thanks to moving the existing let variable out, this should have
identical performance for non-memoised calls, and improved performance
when caching the separator.
2026-06-24 17:16:56 -04:00
nixpkgs-ci[bot]
546a6c9639 Merge staging-next into staging 2026-06-23 18:43:49 +00:00
Silvan Mosberger
dee7389683 lib.cli: performance refactors (#534026) 2026-06-23 13:54:55 +00:00
Eman Resu
8760d9dbed lib.attrsets.collect: use recurse function to avoid passing pred 2026-06-21 19:41:21 -04:00
Eman Resu
27e8b1f69f lib.attrsets.dontRecurseIntoAttrs: only create attrset once 2026-06-21 19:41:21 -04:00
Eman Resu
75cf725444 lib.attrsets.recurseIntoAttrs: only create attrset once 2026-06-21 19:41:21 -04:00
Eman Resu
411e96cfa2 lib.attrsets.getAttrFromPath: beta reduce 2026-06-21 19:27:58 -04:00
Eman Resu
f3e6fa555f lib.attrsets.concatMapAttrs: add test for handling duplicates 2026-06-21 18:04:34 -04:00
Eman Resu
1c53d25f58 lib.attrsets.concatMapAttrs: rewrite for efficiency 2026-06-21 18:01:06 -04:00
Eman Resu
646409453c lib.cli.toGNUCommandLine: beta reduce mkList for free 2026-06-21 16:21:45 -04:00
Eman Resu
a023145c70 lib.cli: use partially applied mkValueStringDefault 2026-06-21 16:16:02 -04:00
Eman Resu
1ffe9499a2 lib.cli.toGNUCommandLine: move variable definition to higher scope 2026-06-21 16:13:54 -04:00
Eman Resu
72785188e1 lib.cli: inherit functions to global scope 2026-06-21 16:13:36 -04:00
Eman Resu
101fd9ad15 lib.cli.toCommandLine: share let variables for a single optionFormat 2026-06-21 16:06:53 -04:00
Emily
bd83232593 lib/systems/doubles: drop x86_64-darwin
This ensures that `lib.platforms.darwin` doesn’t include
`x86_64-darwin` and that the unsupported platform check will trigger
even once the bespoke deprecation error is removed. It doesn’t break
`lib.systems.elaborate "x86_64-darwin"`.
2026-06-21 19:37:17 +01:00