doc/python: clarify `optional-dependencies' are only for explicit dep groups (#377049)
Some project may claim, in their README or otherwise, a particular library as an optional dependency. But it doesn't make it one in the context of the `optional-dependencies` derivation attribute.
This commit is contained in:
@@ -2102,6 +2102,14 @@ Note this method is preferred over adding parameters to builders, as that can
|
|||||||
result in packages depending on different variants and thereby causing
|
result in packages depending on different variants and thereby causing
|
||||||
collisions.
|
collisions.
|
||||||
|
|
||||||
|
::: {.note}
|
||||||
|
The `optional-dependencies` attribute should only be used for dependency groups
|
||||||
|
as defined in package metadata. If a package gracefully handles missing
|
||||||
|
dependencies in runtime but doesn't advertise it through package metadata, then
|
||||||
|
these dependencies should not be listed at all. (One may still have to list
|
||||||
|
them in `nativeCheckInputs` to pass test suite.)
|
||||||
|
:::
|
||||||
|
|
||||||
### How to contribute a Python package to nixpkgs? {#tools}
|
### How to contribute a Python package to nixpkgs? {#tools}
|
||||||
|
|
||||||
Packages inside nixpkgs must use the [`buildPythonPackage`](#buildpythonpackage-function) or [`buildPythonApplication`](#buildpythonapplication-function) function directly,
|
Packages inside nixpkgs must use the [`buildPythonPackage`](#buildpythonpackage-function) or [`buildPythonApplication`](#buildpythonapplication-function) function directly,
|
||||||
|
|||||||
Reference in New Issue
Block a user