Home Explore Blog Models CI



nixpkgs

28th chunk of `nixos/doc/manual/release-notes/rl-2411.section.md`
24878e133a168f18ce204373b54cb784f1bf6008bb4a5de80000000100000e18
  - `lib.unsafeGetAttrPos` -> `builtins.unsafeGetAttrPos`
- [`lib.cli.toGNUCommandLine`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.cli.toGNUCommandLine) now supports the `optionValueSeparator` argument attribute to control the key-value separator for arguments.

Documentation improvements:
- Much of the documentation has been migrated to the [standard doc-comment format](https://github.com/NixOS/rfcs/pull/145), including [`lib.derivations`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-derivations), [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-fixedPoints), [`lib.gvariant`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-gvariant), [`lib.filesystem`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-filesystem), [`lib.strings`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-strings), [`lib.meta`](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-meta).
- [`lib.generators` documentation](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-generators) is now improved and rendered in the manual.
- [`lib.cli` documentation](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-cli) is now improved and rendered in the manual.
- [`lib.composeExtensions`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.fixedPoints.composeExtensions) and [`lib.composeManyExtensions`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.fixedPoints.composeManyExtensions) documentation is now improved.
- [`lib.importTOML`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.trivial.importTOML) and [`lib.importJSON`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.trivial.importJSON)'s documentation now have an example.

Module System:
- `lib.importApply`: New function, imports a Nix expression file much like the module system would, after passing an extra positional argument to the function in the file.
- Improve error message when accessing an option that isn't defined.
- `lib.types.anything`: Don't fail to merge when specifying the same list multiple times.
- Improve error when loading a flake as a module.

### Deprecations {#sec-release-24.11-lib-deprecations}

- [`lib.options.mkPackageOptionMD`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOptionMD) is now obsolete; use the identical [`lib.options.mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption) instead.
- `lib.misc.mapAttrsFlatten` is now formally deprecated and will be removed in future releases; use the identical [`lib.attrsets.mapAttrsToList`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.mapAttrsToList) instead.
- `lib.isInOldestRelease`: Renamed to [`oldestSupportedReleaseIsAtLeast`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.trivial.oldestSupportedReleaseIsAtLeast) and deprecated.

## NixOS Wiki {#sec-release-24.11-wiki}

The official NixOS Wiki at [wiki.nixos.org](https://wiki.nixos.org/) was launched in April 2024, featuring
content initially copied from the community wiki. The wiki enhances the official documentation, linking to
existing resources and providing a categorization system for easy navigation, and is guided by a new "Manual
of Style" — a contribution guide and enhanced templates. It offers a wealth of new information, including
articles on applications, desktop environments, and a growing number of translations in multiple languages.

Title: Nixpkgs Library Updates, Module System Improvements, Deprecations, and NixOS Wiki Launch
Summary
This chunk details further updates to the Nixpkgs Library, including the re-export of `lib.unsafeGetAttrPos` and an enhancement to `lib.cli.toGNUCommandLine`. Significant documentation improvements are noted, with many `lib` sections migrated to a standard doc-comment format and specific enhancements for `lib.generators`, `lib.cli`, and examples for `lib.importTOML` and `lib.importJSON`. The Module System sees the addition of `lib.importApply`, improved error messages, and a fix for `lib.types.anything`. Several functions are deprecated: `lib.options.mkPackageOptionMD` (replaced by `mkPackageOption`), `lib.misc.mapAttrsFlatten` (replaced by `lib.attrsets.mapAttrsToList`), and `lib.isInOldestRelease` (renamed and deprecated). Finally, it announces the official launch of the NixOS Wiki in April 2024, outlining its features like content from the community wiki, a categorization system, a Manual of Style, and multilingual support.