query
On this page

extend

lib.extend

Docs pulled from | This Revision | 10 minutes ago


Patch the Nixpkgs library

A function that applies patches onto the nixpkgs library. Usage is discouraged for most scenarios.

The name extends is a bit misleading, as it doesn't actually extend the library, but rather patches it. It is merely a consequence of being implemented by makeExtensible.

Inputs

  • An "extension function" f that returns attributes that will be updated in the returned Nixpkgs library.

Output

A patched Nixpkgs library.

This functionality is intended as an escape hatch for when the provided version of the Nixpkgs library has a flaw.

If you were to use it to add new functionality, you will run into compatibility and interoperability issues.


Noogle detected

Implementation

The following is the current implementation of this function.

extend = f: lib.makeExtensible (lib.extends f rattrs);