[`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):
Documentation of functions now gets rendered
- [`lib.path`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-path):
New functions:
[`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.hasPrefix),
[`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.removePrefix),
[`splitRoot`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.splitRoot),
[`subpath.components`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.subpath.components).
- [`lib.strings`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-strings):
New functions:
[`replicate`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.replicate),
[`cmakeOptionType`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeOptionType),
[`cmakeBool`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeBool),
[`cmakeFeature`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeFeature).
- [`lib.trivial`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-trivial):
New function:
[`mirrorFunctionArgs`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.trivial.mirrorFunctionArgs).
- `lib.systems`: New function:
[`equals`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.systems.equals).
- [`lib.options`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-options):
Improved documentation for
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
now also supports the `pkgsText` attribute.
Module system:
- Options in the `options` module argument now have the `declarationPositions`
attribute containing the position where the option was declared:
```
$ nix-repl -f '<nixpkgs/nixos>' [...]
nix-repl> :p options.environment.systemPackages.declarationPositions
[ {
column = 7;
file = "/nix/store/vm9zf9wvfd628cchj0hdij1g4hzjrcz9-source/nixos/modules/config/system-path.nix";
line = 62;
} ]
```
Not to be confused with `definitionsWithLocations`, which is the same but for option _definitions_.
- Improved error message for option declarations missing `mkOption`
### Deprecations {#sec-release-23.11-lib-deprecations}
- `lib.meta.getExe pkg` (also available as `lib.getExe`) now gives a warning if
`pkg.meta.mainProgram` is not set, but it continues to default to the
derivation name. Nixpkgs accepts PRs that set `meta.mainProgram` on packages
where it makes sense. Use `lib.getExe' pkg "some-command"` to avoid the
warning and/or select a different executable.