Commit Graph

5033 Commits

Author SHA1 Message Date
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
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
Lin Jian
e0101cb9cf lib/modules: make comment more clear 2026-05-10 15:47:59 +08:00
Guilhem Saurel
1a3f63b09c lib.license: add JSON 2026-05-08 12:16:02 +02:00
Nick Cao
7ed8aa763c nbd: 3.25 -> 3.27.1 (#515240) 2026-05-07 20:49:02 +00:00
Alyssa Ross
a5974a5550 nim: deprecate and move os and cpu to stdenv.targetPlatform.nim (#513302) 2026-05-06 16:10:53 +00:00
eveeifyeve
a8f0a99212 nim: deprecate and move os and cpu to stdenv.targetPlatform.nim
This change makes it more accesssable to using nim cpu and os without
referencing nim.
2026-05-06 22:29:23 +10:00
jopejoe1
aac795740f lib.licenses: add w3c-19980720 2026-05-06 10:50:57 +02:00
Alyssa Ross
1b58ebe645 mpich: set license to mpich2 (#516853) 2026-05-05 15:20:19 +00:00
jopejoe1
6821c758f5 lib.licenses: add bsd3Modification 2026-05-04 13:02:34 +02:00
Alyssa Ross
a58377983f lib.systems: various small performance improvements (#514493) 2026-05-04 08:15:54 +00:00
Eman Resu
acd5585a3b lib.systems.parse: check if cpus are equal first
Rather than doing this last, we do it first. Saves a little time if
we're comparing to an identical platform
2026-05-03 16:49:37 -04:00
Alyssa Ross
ff7579709b stdenv/check-meta: various performance cleanups (#514492) 2026-05-03 17:26:37 +00:00
Alyssa Ross
d474d1d274 lib/customization: various performance improvements (#515116) 2026-05-03 15:19:24 +00:00
Eman Resu
0b29c3289e lib.callPackageWith: check if args are already empty before handling defaults 2026-05-03 08:23:34 -04:00
Eman Resu
efd9c79a80 lib.callPackageWith: filter names instead of attributes 2026-05-03 08:23:33 -04:00
Eman Resu
54cbe35bf9 lib.callPackageWith: use custom version of filterAttrs
Avoids a double-negation and passing the name every time.
2026-05-03 08:23:33 -04:00
Eman Resu
caab17b274 lib.callPackageWith: move error message variables out of happy path 2026-05-03 08:23:32 -04:00
Eman Resu
6a07020e3c lib.overrideDerivation: rewrite to not be utterly ridiculous
Why are we running a `flip` on arguments we can control? Why are we
using `or` on one line only to use a full if/else on the next line? Why
are we merging with {}, and why have we been doing it for three years?
THese are the questions I ask myself.
2026-05-03 08:23:32 -04:00