From 7dfebf9c96112a4e68dedb093d48a5fc1af65012 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 6 Jan 2026 17:02:08 +0200 Subject: [PATCH] python.section.md: List finalAttrs.passthru only attributes --- doc/languages-frameworks/python.section.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 6472c3f57789..990b12d3a9db 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -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 [`.overrideAttrs`](#sec-pkg-overrideAttrs) under the `passthru` attribute. +Such arguments include: + +- `disabled` +- `pyproject` +- `format` +- `build-system` +- `dependencies` +- `optional-dependencies` + + +::: + 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