Commit graph

4742 commits

Author SHA1 Message Date
nixpkgs-ci[bot] 7d9f8fb0c1
Merge staging-next into staging 2025-10-02 15:59:43 +00:00
nixpkgs-ci[bot] 7f2d963f4f
Merge master into staging-next 2025-10-02 15:58:50 +00:00
Robert Hensing 6a5f6f1a4e
lib: init strings.join (#446278) 2025-10-02 15:34:34 +00:00
nixpkgs-ci[bot] d6ac0273cd
Merge staging-next into staging 2025-10-01 00:19:21 +00:00
K900 4999ae577c Merge remote-tracking branch 'origin/master' into staging-next 2025-09-30 21:47:55 +03:00
Philip Taron 44998896c6
lib: remove optional builtins prefixes from prelude functions (#447402) 2025-09-30 16:28:04 +00:00
John Ericson 941a243895
cygwin: add as a cross-compilation target, and get hello to build (#444470) 2025-09-30 14:16:25 +00:00
NAHO e8f998c3bc
lib: add builtins prefixes for prelude functions to improve clarity 2025-09-30 09:38:12 +02:00
NAHO 6177c4ad72
lib: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd --type file . lib --exec-batch sed --in-place --regexp-extended "
      s/\<builtins\.($(
        printf '%s\n' "${builtins[@]}" |
          paste --delimiter '|' --serial -
      ))\>/\1/g
    "

    nix fmt
2025-09-30 09:02:59 +02:00
nixpkgs-ci[bot] 4c0880e710
Merge staging-next into staging 2025-09-29 12:08:02 +00:00
nixpkgs-ci[bot] 3c90917fd5
Merge master into staging-next 2025-09-29 12:07:15 +00:00
Alyssa Ross f0cc6e6348
lib.customisation: inherit unsafeGetAttrsPos in let-in (#446761) 2025-09-29 07:54:31 +00:00
·𐑑𐑴𐑕𐑑𐑩𐑤 c2b0328fa1 lib/sources: add Darcs to cleanSource 2025-09-29 01:24:24 +07:00
·𐑑𐑴𐑕𐑑𐑩𐑤 e6e1581d39 lib/sources: add Pijul to cleanSource 2025-09-29 01:24:24 +07:00
jopejoe1 3e8895f981 lib.licenses: add licenses used in nixpkgs 2025-09-28 18:47:20 +02:00
Yueh-Shun Li 4fa63ffcca lib.customisation: inherit unsafeGetAttrsPos in let-in 2025-09-28 03:05:49 +08:00
David McFarland 39fd8e4adf cygwin: init as a target toolchain
The old cygwin support used -pc-windows-cygnus as the config.  This is
supported by LLVM, but not by GNU. This will change it to -pc-cygwin,
which is more generally supported.

Because the kernel is now 'cygwin' rather than 'windows', isWindows will
return false. There are lots of different reasons isWindows is used in
nixpkgs, but in my experience they often have to do with posix
compatibility and don't apply to cygwin.

Co-authored-by: Brian McKenna <brian@brianmckenna.org>
2025-09-27 13:29:44 -03:00
Johannes Kirschbauer b37ac6a920
lib: init strings.join 2025-09-27 09:18:37 +02:00
nixpkgs-ci[bot] b9fe052b5c
Merge staging-next into staging 2025-09-25 18:06:34 +00:00
nixpkgs-ci[bot] e11e848c96
Merge master into staging-next 2025-09-25 18:05:56 +00:00
Johannes Kirschbauer 2b2df96038
lib/types: submodule fix description with freeformType (#443134) 2025-09-25 14:57:10 +00:00
jopejoe1 bdc3cdda42
font-bitstream-{100dpi,75dpi,type1}: refactor, move to pkgs/by-name and rename from xorg.fontbitstream*, xorg.fontbitstreamspeedo: drop (#442323) 2025-09-25 13:05:09 +02:00
nixpkgs-ci[bot] f4c61486bf
Merge master into staging-next 2025-09-24 12:07:37 +00:00
Robert Hensing 16ee869413
lib/modules: rename defs''' into human friendly names (#445593) 2025-09-24 09:29:02 +00:00
Johannes Kirschbauer 1c960d4bcf
lib/modules: rename defs''' into human friendly names 2025-09-24 09:22:29 +02:00
quantenzitrone 4c4fd26ced
font-bitstream-type1: refactor, move to pkgs/by-name and rename from xorg.fontbitstreamtype1
the package output doesn't change
2025-09-23 22:50:27 +02:00
nixpkgs-ci[bot] ca7f2a47c0
Merge staging-next into staging 2025-09-19 18:06:36 +00:00
Ihar Hrachyshka 97226ef7db licenses: add sissl11
This is Sun Industry Standard Source License 1.1:
https://opensource.org/license/sissl

It was voluntarily retired. Still, it's used in some projects.
Specifically, openvswitch ships some files under lib/sflow*[ch] under
this license.

This license will be added to both openvswitch and ovn packages (the
latter embeds openvswitch libraries, including sflow).
2025-09-19 11:54:51 -04:00
Robert Hensing 35cb0d92d8 lib/tests/modules: Test description composition 2025-09-17 14:00:10 +02:00
Johannes Kirschbauer 717bb9db24
lib/types: submodule fix description with freeformType 2025-09-16 16:27:32 +02:00
nixpkgs-ci[bot] 6ec57b45c7
Merge staging-next into staging 2025-09-15 16:09:34 +00:00
Yuriy Taraday dd12290517 Reapply "stdenv: Add CPE fields to meta"
This reverts commit de74f9caf0.
2025-09-15 17:25:11 +02:00
nixpkgs-ci[bot] bd09088666
Merge staging-next into staging 2025-09-14 06:05:52 +00:00
Johannes Kirschbauer 348e5028e7
lib/types: minimal fix for the regression of either when used in freeformType (#440459) 2025-09-14 04:38:10 +00:00
nixpkgs-ci[bot] eea9839c6e
Merge staging-next into staging 2025-09-14 00:17:55 +00:00
jopejoe1 4d56433d94
lib.licenses: some more cleanup (#439307) 2025-09-13 21:08:19 +00:00
nixpkgs-ci[bot] cebc703cbc
Merge staging-next into staging 2025-09-12 18:06:00 +00:00
Felix Buehler 06ac3fbebd lib/*: fix docs to use "returns" instead of "return" 2025-09-12 16:16:41 +02:00
Johannes Kirschbauer 0047f9de6c
lib/trivial: add boolToYesNo (#413036) 2025-09-12 13:05:31 +00:00
nixpkgs-ci[bot] 96acd252c7
Merge staging-next into staging 2025-09-12 00:16:59 +00:00
Felix Buehler c1ad4464c6 lib/trivial: add boolToYesNo 2025-09-11 21:48:47 +02:00
Robert Hensing 0bdb5c1be2
lib.options.optionAttrSetToDocList: add visible = "transparent" (#441782) 2025-09-11 18:24:13 +00:00
nixpkgs-ci[bot] 0da46582cf
Merge staging-next into staging 2025-09-11 18:06:10 +00:00
Matt Sturgeon 6c20442479
lib.options.optionAttrSetToDocList: add visible = "transparent"
Allows marking an option as invisible, without excluding its sub-options.

In practice, this is similar to `visible = true; internal = true;`,
however it is more explicit and less reliant on implementation details.
2025-09-11 17:00:17 +01:00
Robert Hensing 48ddbb29a1
lib.options.mkOption: clean up visible docs 2025-09-11 17:00:17 +01:00
misuzu 8d45e68ff1
lib.mkEUI64Suffix: init (#416086) 2025-09-11 15:26:02 +00:00
nukdokplex d24f103572
lib.mkEUI64Suffix: fix syntax errors and tests 2025-09-11 00:01:53 +05:00
nukdokplex 68253aae9b
lib.mkEUI64Suffix: bring @hsjobeki suggestions
renamed `mac` to `octets` in hextets combining step for better var
naming; rephrased error message to provide a hint of expected format;
replaced `Arguments` with `Inputs` in docstring; added more test cases
for invalid hex digits; added comments in hextets combining step;
2025-09-10 23:41:18 +05:00
Matt Sturgeon ba961de6fb
lib.options.mkOption: use one-sentence-per-line for visible docs 2025-09-10 14:41:12 +01:00
Matt Sturgeon 1efdbe8f2f
lib/tests/misc: add option visibility test 2025-09-10 14:34:59 +01:00
nixpkgs-ci[bot] b7962594cc
Merge staging-next into staging 2025-09-10 06:32:10 +00:00
Marie Ramlow b6d48619ed lib.systems: add ppc32 target 2025-09-10 08:15:07 +02:00
nukdokplex 7abe9e95ec
lib.network: add lib.mkEUI64Suffix tests to network.sh 2025-09-09 12:23:41 +05:00
nukdokplex 2a31d7e083
lib.mkEUI64Suffix: init 2025-09-09 12:23:38 +05:00
Robert Hensing 7ba464154f lib: Introduce Cross Index concept
A Cross Index, short for Cross Platform Pair Index, is the essential
shape of a splice, without the invoking the more mind bending concept
of adding variations of for these 6 pairings to an existing thing so
that it can be switched out for something else.

So the purpose of a Cross Index is to contain the result of `f`\
(which may be reified in code, or just an abstract concept):
 - f "build" "build"
 - f "build" "host"
 - ...

Splicing on the other hand refers not just to these six variants, but
to the idea of tacking them onto one of the variants. (hostTarget,
I believe)

Cross Indexes are a necessity for making cross compilation work, but
splicing is more than necessary.
2025-09-09 04:42:37 +02:00
Robert Hensing ca4beaaf1c lib: Add splice structure utilities 2025-09-09 04:42:36 +02:00
nixpkgs-ci[bot] d79f79666b
Merge staging-next into staging 2025-09-09 00:17:07 +00:00
K900 3d4257c912 Merge remote-tracking branch 'origin/master' into staging-next 2025-09-08 22:24:07 +03:00
Wolfgang Walther 399136b3d7
lib/attrsets: add mapAttrsToListRecursive(Cond) function (#395160) 2025-09-08 19:12:59 +00:00
nixpkgs-ci[bot] 8e9a89be3a
Merge staging-next into staging 2025-09-07 18:05:28 +00:00
nixpkgs-ci[bot] 7f33f65be5
Merge master into staging-next 2025-09-07 18:04:47 +00:00
Emily 3b7e7e362b haskell.compiler.ghc928: drop 2025-09-07 18:45:52 +01:00
Johannes Kirschbauer b3cf9ce0f9
lib/types.either: add tests for warning in legacy case 2025-09-06 12:29:16 +02:00
Johannes Kirschbauer 8a5c4598d8
lib/types: either allow unchecked values again
This fixes a slight regression of the either type
Where it allowed access to any value when used in freeformType
2025-09-06 11:49:31 +02:00
jopejoe1 81da94fb58
licenses: add CNRI-Python, python313Packages.regex: fix homepage and license, set pyproject = true (#439748) 2025-09-04 14:31:11 +02:00
nixpkgs-ci[bot] 8d5424e46b
Merge master into staging-next 2025-09-03 00:15:33 +00:00
Sandro Jäckel e3ffeb20ce
licenses: add CNRI-Python 2025-09-03 02:13:08 +02:00
Winter ba37aa75e0
lib.addMetaAttrs: use overrideAttrs when available (#423615) 2025-09-02 15:23:14 -04:00
nixpkgs-ci[bot] 4005e98c51
Merge master into staging-next 2025-09-02 12:07:22 +00:00
Johannes Kirschbauer 95479bec21
lib.attrsets.unionOfDisjoint: simplify explanation (#439225)
The whole business of `// z` is a confusing implementation detail for
the reader.
2025-09-02 11:32:18 +02:00
Wolfgang Walther 568b19f656
maintainers: require GitHub handle
At the scale of Nixpkgs, actively maintaining a package is only possible
with integration into CI. To be able to be pinged for review requests,
the maintainer must have a GitHub handle, which:
- Leads to an invitation to the NixOS org, which comes with additional
privileges.
- Allows to request the maintainer for review as a member of this org.
- Automatically requests the maintainer for review in CI.

Currently, the GitHub handle is not strictly enforced. This leads to
some new maintainers accidentally forgetting to set these. We can avoid
these mistakes and enforce them via CI.
2025-09-02 09:57:25 +02:00
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
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