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

This commit is contained in:
Doron Behar
2026-04-29 08:55:46 +03:00
parent 146bc8dcb2
commit 7dfebf9c96
@@ -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