Eman Resu
f23b117e50
lib.showWarnings: inherit lib functions, beta reduce for free
2026-05-21 14:50:51 -04:00
Eman Resu
7f6eb89aeb
lib.{importJSON,importTOML}: inherit builtins to global scope
2026-05-21 14:47:07 -04:00
Eman Resu
1f83c2cc22
lib.toBaseDigits: avoid reversing list
2026-05-21 14:41:38 -04:00
Eman Resu
19fcf5006a
lib.mirrorFunctionArgs: inline call to setFunctionArgs
2026-05-21 14:41:38 -04:00
adisbladis
8abecec2ab
lib.extendMkDerivation: performance cleanups ( #522123 )
2026-05-21 02:48:31 +00:00
adisbladis
8efcb39ab2
lib.fetchers: minor performance improvements ( #522121 )
2026-05-21 02:46:56 +00:00
Eman Resu
32a1903229
lib.licenses: inherit lib functions into global scope
2026-05-20 00:32:15 -04:00
Eman Resu
1883329515
lib.licenses: use && for exception licenses
...
Seems preferable to iterating over a two-element list.
licenseType.exception is only used by lib.licenses.WITH, which I don't
see any usage of in tree - but thought I might as well.
2026-05-20 00:32:15 -04:00
Eman Resu
64e42fb8b1
lib.licenses: add evaluateNamedProperty for quickly checking subattributes
2026-05-20 00:32:14 -04:00
Eman Resu
9e48db8d39
lib.licenses: prevent subcalls for non-simple licenses
2026-05-19 23:02:22 -04:00
Eman Resu
22fcb80812
lib.licenses: only define OR and AND once
2026-05-19 23:02:21 -04:00
Eman Resu
fb84fe6d6f
lib.fetchers.withNormalizedHash: share removed attributes for every call
2026-05-19 22:07:17 -04:00
Eman Resu
25118b87ed
lib.fetchers.withNormalizedHash: define hashSet before taking fetcher
2026-05-19 22:07:17 -04:00
Eman Resu
35d9631df3
lib.fetchers: share default hash types between functions
2026-05-19 22:07:17 -04:00
Eman Resu
cb3f3435bb
lib.fetchers: reuse default hash names between calls
2026-05-19 22:07:17 -04:00
Eman Resu
a64ab557a0
lib.fetchers.normalizeHash: avoid expensive builtins.tail call
2026-05-19 22:07:16 -04:00
Eman Resu
0466dc5b70
lib.fetchers.normalizeHash: remove unnecessary quotes
2026-05-19 22:07:16 -04:00
Eman Resu
e4d668e964
lib.fetchers: inherit commonH lib functions into global scope
2026-05-19 22:07:15 -04:00
Eman Resu
a6ff6c6bac
lib.fetchers.withNormalizedHash: move lib inherits to toplevel
2026-05-19 22:07:15 -04:00
Eman Resu
1095dc1dd2
lib.fetchers.normalizeHash: move lib inherits to toplevel
2026-05-19 22:07:15 -04:00
Eman Resu
01272740d8
lib.extendMkDerivation: save several function calls
2026-05-19 20:59:24 -04:00
Eman Resu
a50c77cc33
lib.extendMkDerivation: use a single attrset instead of merging
2026-05-19 20:45:42 -04:00
Alyssa Ross
3570433a71
lib.licenses: add new spdxIds ( #519321 )
2026-05-18 12:56:15 +00:00
Alyssa Ross
5b6295c126
lib.license: add CFITSIO license, cfitsio: change license and homepage ( #521119 )
2026-05-18 06:01:05 +00:00
adisbladis
bd43f11bc5
lib.trivial: save attrset lookups in highly used functions ( #520296 )
2026-05-18 02:34:47 +00:00
Nicolas Benes
ab376383ec
lib.license: add CFITSIO license
2026-05-17 01:14:09 +02:00
Emily
ba777b3b20
lib.systems.equals: fix euqality on re-elaborated platform ( #521043 )
2026-05-16 18:39:00 +00:00
Mix
cadca751c4
lib.systems.equals: fix euqality on re-elaborated platform
2026-05-17 02:14:48 +08:00
adisbladis
5a4597cc83
lib.systems: foldl -> foldl'
2026-05-16 15:51:29 +12:00
Eman Resu
bb71feaec1
lib.functionArgs: save a function call on every lookup
2026-05-14 19:29:25 -04:00
Eman Resu
77334757d7
lib.isFunction: save an attribute lookup
2026-05-14 19:28:43 -04:00
Johannes Kirschbauer
0bb05b5bd0
lib/modules: document limitations of 'mkRenamedOptionModule' ( #470160 )
2026-05-14 13:35:43 +00:00
toonn
1aa1947487
lib.types: Fix biggest/smallest supported int comment
2026-05-13 18:44:05 +02:00
Johannes Kirschbauer
e8f89b3417
lib.types: small performance improvements ( #517843 )
2026-05-13 14:21:26 +00:00
Emily
036199b38a
lib.systems.equals: only filter functions once ( #513844 )
2026-05-13 00:56:58 +00:00
Eman Resu
db9c713393
lib.types: move variable to its usage, don't check condition twice
...
The only place `merged` is used already checks if `coercedType.merge ?
v2`, so we don't need to check it again. We can also avoid creating the
variable if coercedTypes.merge doesn't have a v2 attribute.
2026-05-12 11:23:18 -04:00
Eman Resu
9b693534b4
lib.types: inline tail binding
2026-05-12 11:23:16 -04:00
Eman Resu
51a39dc768
lib.types: use head foo instead of elemAt foo 0
2026-05-12 11:23:14 -04:00
Eman Resu
89effed623
lib.types: reuse args in v2 merge functions
2026-05-12 11:23:05 -04:00
Eman Resu
1f94af932c
lib.types: add variables to global scope
2026-05-12 11:23:04 -04:00
Eman Resu
5616d07fe0
lib/types: filter for nulls instead of counting them
2026-05-12 11:22:36 -04:00
Eman Resu
ea872088f3
lib/types: only filter if we're actually getting an error
2026-05-12 11:22:33 -04:00
Eman Resu
cc86a8faa0
lib.types: inherit builtins into scope
2026-05-12 11:22:25 -04:00
Eman Resu
6c84f96a96
lib.types: inherit builtins to global scope
2026-05-12 11:22:24 -04:00
Eman Resu
4a63856f02
lib.modules: avoid override filtering on singleton lists
2026-05-12 11:22:11 -04:00
Eman Resu
b707b446ba
lib.modules: use concatMap for override filtering
2026-05-12 11:22:00 -04:00
Jo
edd1740936
lib.licenses: add new spdxIds
...
These licenses gained a `spdxId` since they were added to nixpkgs
2026-05-12 11:44:04 +02:00
Jo
aac4727522
lib.license: add JSON, vimPlugins.barbar-nvim: set license ( #518023 )
2026-05-11 15:25:47 +00:00
Johannes Kirschbauer
420a86a788
lib/strings.concatLines: call concatStringsSep directly v2 ( #514515 )
2026-05-10 13:14:20 +00:00
Johannes Kirschbauer
dde1dfb0a0
lib/modules: make comment more clear ( #518612 )
2026-05-10 12:52:40 +00:00