Home Explore Blog CI



nixpkgs

24th chunk of `nixos/doc/manual/release-notes/rl-2311.section.md`
d26b2987578445b289133b7f5304f2e249612c7c8735a8ec0000000100000aff
  A new sub-library to select local files to use for sources, designed to be
  easy and safe to use.

  This aims to be a replacement for `lib.sources`-based filtering. To learn
  more about it, see [the blog
  post](https://www.tweag.io/blog/2023-11-28-file-sets/) or [the
  tutorial](https://nix.dev/tutorials/file-sets).

- [`lib.gvariant`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-gvariant):
  A partial and basic implementation of GVariant formatted strings. See
  [GVariant Format
  Strings](https://docs.gtk.org/glib/gvariant-format-strings.html) for details.

  :::{.warning}
  This API is not considered fully stable and it might therefore
  change in backwards incompatible ways without prior notice.
  :::

- [`lib.asserts`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-asserts):
  New function:
  [`assertEachOneOf`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.asserts.assertEachOneOf).
- [`lib.attrsets`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-attrsets):
  New function:
  [`attrsToList`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.attrsets.attrsToList).
- [`lib.customisation`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-customisation):
  New function:
  [`makeScopeWithSplicing'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.customisation.makeScopeWithSplicing-prime).
- [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-fixedPoints):
  Documentation improvements for
  [`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.fixedPoints.fix).
- `lib.generators`: New functions:
  [`mkDconfKeyValue`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.mkDconfKeyValue),
  [`toDconfINI`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.toDconfINI).

  `lib.generators.toKeyValue` now supports the `indent` attribute in its first
  argument.
- [`lib.lists`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-lists):
  New functions:
  [`findFirstIndex`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.findFirstIndex),
  [`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.hasPrefix),
  [`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.removePrefix),
  [`commonPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.commonPrefix),
  [`allUnique`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.allUnique).

  Documentation improvements for
  [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl-prime).
- [`lib.meta`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-meta):

Title: Nixpkgs Library Additions and Improvements: fileset, gvariant, asserts, attrsets, customization, fixedPoints, generators, lists, meta
Summary
This section highlights additions and improvements to the Nixpkgs library, including: the new `lib.fileset` sub-library for safer local file selection, a basic implementation of `lib.gvariant` for GVariant formatted strings, a new `assertEachOneOf` function in `lib.asserts`, a new `attrsToList` function in `lib.attrsets`, a new `makeScopeWithSplicing'` function in `lib.customisation`, documentation improvements for `lib.fixedPoints.fix`, new functions `mkDconfKeyValue` and `toDconfINI` in `lib.generators`, new functions `findFirstIndex`, `hasPrefix`, `removePrefix`, `commonPrefix`, and `allUnique` in `lib.lists`, and documentation improvements for `lib.lists.foldl'`.