Commit Graph

5275 Commits

Author SHA1 Message Date
jopejoe1
33f92fb565 lib.licenses: replace qwt with qwtException 2025-09-01 21:40:13 +02:00
jopejoe1
7e3c021be1 lib.licenses: caossl rename to asl11
This is just the Apache-1.1 license so make use of it and not some random name
2025-09-01 19:28:03 +02:00
jopejoe1
e85bfdae29 lib.license: purdueBsd rename to lsof
spdx has marked this as lsof license
2025-09-01 19:12:19 +02:00
jopejoe1
d1d63d0dcf lib.licenses: drop in favor of bsd3Lbnl
This is the same license
2025-09-01 19:04:46 +02:00
Wolfgang Walther
bf4b47abc7 lib.attrsets.unionOfDisjoint: simplify explanation
The whole business of `// z` is a confusing implementation detail for
the reader.
2025-09-01 16:52:54 +02:00
nixpkgs-ci[bot]
b270f0d459 Merge master into staging-next 2025-09-01 12:07:13 +00:00
Plume
0477b30ab6 lib.attrsets.genAttrs': init (#436434)
* lib.attrsets.genAttrs': init

* lib.attrsets.genAttrs: rewrite with lib.attrsets.genAttrs'

* lib.attrsets.{genAttrs,genAttrs'}: add tests

* Update lib/attrsets.nix

Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>

* Update lib/attrsets.nix

Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>

* lib.attrsets.genAttrs': document and test attrName collision

---------

Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2025-09-01 11:58:28 +02:00
nixpkgs-ci[bot]
28a77664bb Merge master into staging-next 2025-08-31 18:04:38 +00:00
jopejoe1
4cdf78c257 lib.licenses: drop gpl2Oss
Is not used anywhere in nixpkgs and is not in spdx
2025-08-31 16:19:22 +02:00
jopejoe1
e19ad622ae lib.licenses: replace gpl2UBDLPlus license with ubdlException 2025-08-31 16:19:22 +02:00
jopejoe1
61d0373a40 lib.licenses: replace classpath license with exception
The GPL-2.0-with-classpath-exception is deprecated in spdx and the exception Classpath-exception-2.0 should be used instead.
Other Classpath license hace also benn replaced with it.
2025-08-31 16:19:22 +02:00
jopejoe1
bb291395ec lib.licenses: replace wxWindows with wxWindowsException31
wxWindows git deprecated by spedx and got replaced with an exeption that needs to be combined with other licenses https://spdx.org/licenses/wxWindows.html
2025-08-31 16:19:22 +02:00
jopejoe1
ec03e1d46a lib.licenses: add missing spdxId's
also remove shortName and url from those
2025-08-31 16:19:22 +02:00
Mikael Voss
e5ac84e29c lib/attrsets: add mapAttrsToListRecursive(Cond) function 2025-08-31 12:11:43 +02:00
Vladimír Čunát
d95b37aeac Merge branch 'staging' into staging-next 2025-08-30 17:06:43 +02:00
K900
de74f9caf0 Revert "stdenv: Add CPE fields to meta" 2025-08-30 09:29:43 +03:00
K900
e4f14776e7 Merge remote-tracking branch 'origin/staging-next' into staging 2025-08-30 09:19:01 +03:00
Yuriy Taraday
b0ce3dc09f stdenv: Add CPE fields to meta
Add `identifiers` attr to `meta` attribute with following attrs:
* `cpe` with the full CPE string when available
* `possibleCPEs` with the list of potential CPEs when not all
  information is provided
* `cpeParts` with the destructured CPE string, allowing to override it
  whenever needed
* `v1` attribute set with `cpe` and `cpeParts` from above and a
  guarantee of a backwards-compatible interface

Related issue: https://github.com/NixOS/nixpkgs/issues/354012
2025-08-29 15:40:03 +02:00
quantenzitrone
fea4046333 xkbutils: refactor and move to pkgs/by-name from xorg namespace 2025-08-29 15:21:30 +02:00
Niols
ad1e615f48 lib.types: add module tests for fileset 2025-08-29 13:07:55 +02:00
Niols
9c00c9af71 lib.types: add a fileset type 2025-08-29 13:07:55 +02:00
Niols
b99df9d494 lib.fileset: expose the empty fileset 2025-08-29 13:07:55 +02:00
Niols
a99adc7c06 lib.fileset: add isFileset helper 2025-08-29 13:07:55 +02:00
nixpkgs-ci[bot]
254e2173bf Merge staging-next into staging 2025-08-28 18:06:30 +00:00
quantenzitrone
e21431a165 font-adobe-utopia-100dpi: refactor, move to pkgs/by-name and rename from xorg.fontadobeutopia100dpi
relevant changes:
- font is now in $out/share/fonts/X11 instead of $out/lib/X11/fonts
  i have no idea why fonts would be in lib, so lets see if this breaks
  anything
- font is now under the license adobeUtopia (recognised by SPDX) instead
  of unfreeRedistributable
2025-08-28 15:21:32 +02:00
Robert Hensing
83fed2e6ff lib.modules: init types checkAndMerge to allow adding 'valueMeta' (#391544) 2025-08-28 14:34:31 +02:00
Winter
2141b4e38b lib.addMetaAttrs: use overrideAttrs when available
Previously, any subsequent change to a derivation after
an `addMetaAttrs` call would cause said attribute(s) to
be unconditionally reset back to their previous value(s):

    nix-repl> ((oldPkgs.lib.lowPrio oldPkgs.hello).overrideAttrs {a = 1;}).meta.priority
    error:
        … while evaluating the attribute 'meta.priority'
            at /nix/store/nxdiklm6dnf9pma1zg7srls2nzrykrjf-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:846:17:
            845|         inherit passthru overrideAttrs;
            846|         inherit meta;
                |                 ^
            847|       }

        error: attribute 'priority' missing
        at «string»:1:67:
                1| ((oldPkgs.lib.lowPrio oldPkgs.hello).overrideAttrs {a = 1;}).meta.priority
                |                                                                   ^

This change makes it so that this does not happen (unless, of
course, a subsequent override does affect those values):

    nix-repl> ((newPkgs.lib.lowPrio oldPkgs.hello).overrideAttrs {a = 1;}).meta.priority
    10

Fixes #323624.
2025-08-27 16:35:53 -04:00
Jörg Thalheim
d92bfd5feb Nix 2.24 removal (#437039) 2025-08-27 22:28:58 +02:00
Jörg Thalheim
1b7637ff08 nix_2_24: remove 2025-08-27 22:18:31 +02:00
Philip Taron
01df068cc8 lib, mkDerivation: Document overriding functions (#428563) 2025-08-27 06:13:54 -07:00
YoshiRulz
e17a4719a9 lib.toList: fix typo in docs 2025-08-26 04:16:00 +10:00
Martin Weinelt
4bd0b9c7ab Reapply "Merge remote-tracking branch 'origin/master' into staging-next"
This reverts commit 106b1418bc.

Restores the commits lost during the revert of a merge on staging-next.
2025-08-23 16:06:41 +02:00
K900
e9a7500b70 Merge remote-tracking branch 'origin/master' into staging-next 2025-08-23 09:24:59 +03:00
Wolfgang Walther
aef40b0b5f lib/minfeatures: init from minver.nix (#433057) 2025-08-22 18:08:57 +00:00
nixpkgs-ci[bot]
a554ed914c Merge master into staging-next 2025-08-22 18:05:33 +00:00
Matt Sturgeon
5a07f707c5 lib.customisation.callPackageWith: fix line number interpolation
We need to use `toString` on `loc.line` because it is an int.
2025-08-22 18:48:43 +01:00
nixpkgs-ci[bot]
d263613f2e Merge master into staging-next 2025-08-22 12:06:42 +00:00
Wolfgang Walther
ab4281e967 lib/minfeatures: init from minver.nix
The concept of having a "minimum supported Nix version" doesn't work
anymore today, for the following reasons:
- With multiple forks / implementations of Nix available, their feature
sets and versions will differ. We'd need *multiple* minimum versions,
one for each implementation.
- Lix does not expose its real version. It only reports "2.18.3-lix",
even though its real version is in the 2.90+ range.
- A minimum version has the expectation that it could be *raised* in the
future. That's not possible with Lix, because Lix will always and
forever report the above version.
- A minimum version has the expectation that *all* versions bigger than
the minimum are supported. That was already quite a stretch when minver
was 2.3 and none of the Nix versions between 2.4 and 2.23 were packed
anymore. But it's impossible for us to test all these non-LTS versions
anyway: We don't have Nix 2.18, 2.19, 2.20, 2.21, 2.22, 2.23, 2.25, 2.26
and 2.27 available in Nixpkgs at the time of this writing.

With their policy around `builtins.nixVersion`, Lix forces our hand: We
need to replace minver.nix with a "feature detection" mechanism.

This PR introduces the first two features:
- The availability of `builtins.nixVersion`: If this is not available,
the version of Nix is so old, that we surely don't support it anymore.
- The value of `builtins.nixVersion` being greater or equal to 2.18.

Note, that this does **not** imply support for Nix 2.18. Instead,
explicitly supported versions of Lix and Nix are only these that we
actually test against.

If, eventually, we realize that the supported versions have advanced and
Nixpkgs has adopted a feature only available in newer versions, we will
have to add a feature check for this.

Put differently: The list of features in `minfeatures.nix` is not
expected to be complete. It's a list of known-to-be-bad conditions that
will cause problems when evaluating Nixpkgs. Their only purpose is to be
able to show a helpful error message. Some other versions might also not
be supported, but might fail with more subtle errors. That's just
reality and has always been the case previously as well.
2025-08-22 12:47:13 +02:00
Wolfgang Walther
be6f781b95 lib: cleanup after bump of minver (#433101) 2025-08-22 10:41:35 +00:00
Fabián Heredia Montiel
971840c5e0 Merge remote-tracking branch 'origin/master' into staging-next 2025-08-20 23:30:45 -06:00
quantenzitrone
dd9fa15dbf licenses.bsd3ClauseTso: rename and add spdxId
it got accepted and merged to spdx: https://github.com/spdx/license-list-XML/pull/2815
2025-08-21 05:24:42 +02:00
Johannes Kirschbauer
bb0bd3d413 lib/modules: add _internal to valueMeta of checkedAndMerged 2025-08-20 21:55:19 +02:00
Fabián Heredia Montiel
0e9af74ced Merge remote-tracking branch 'origin/master' into staging-next 2025-08-18 22:43:58 -06:00
Emily
6e959288bb lib.systems.examples: bump Android SDK and NDK
Per <https://github.com/android/ndk/wiki>, NDK 26 is EOL.
2025-08-18 16:52:14 +01:00
Johannes Kirschbauer
4f802d935c lib/modules: fix typo 2025-08-18 08:01:24 +02:00
nixpkgs-ci[bot]
6870d2a5fa Merge master into staging-next 2025-08-17 18:05:03 +00:00
Emily
922b6476c5 lib: deprecate fromHexString on dodgy inputs (#434218) 2025-08-17 17:17:43 +01:00
nixpkgs-ci[bot]
2bdc906674 Merge master into staging-next 2025-08-16 18:05:04 +00:00
Emily
3c7d67da23 lib: deprecate fromHexString on dodgy inputs
See <https://github.com/NixOS/nixpkgs/pull/433710>.
2025-08-16 13:36:05 +01:00
Emily
677ccc5446 lib: fix overflowing fromHexString tests and example (#433710) 2025-08-16 13:25:31 +01:00