Commit 7dfebf9c authored by Doron Behar's avatar Doron Behar
Browse files

python.section.md: List finalAttrs.passthru only attributes

parent 146bc8dc
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -241,6 +241,27 @@ buildPythonPackage (finalAttrs: {

See the [general documentation on fixed-point arguments](#chap-build-helpers-finalAttrs) for more details on the benefits of this pattern.

::: {.note}

Some `buildPythonPackage`/`buildPythonApplication` arguments are passed down indirectly to `stdenv.mkDerivation` via `passthru`.
Therefore the final states of these attributes can be accessed via `finalAttrs.passthru.${name}`, and they can be overridden via [`<pkg>.overrideAttrs`](#sec-pkg-overrideAttrs) under the `passthru` attribute.
Such arguments include:

- `disabled`
- `pyproject`
- `format`
- `build-system`
- `dependencies`
- `optional-dependencies`

<!--
TODO(@doronbehar): When `.overridePythonAttrs` will be removed, the above text might need to be revised. See:

- https://github.com/NixOS/nixpkgs/pull/379637
- https://github.com/NixOS/nixpkgs/pull/469804
-->
:::

The [`stdenv.mkDerivation`](#sec-using-stdenv) function accepts various parameters for describing
build inputs (see "Specifying dependencies"). The following are of special
interest for Python packages, either because these are primarily used, or