renderers

lib.renderers.withPackages

Type: withPackages :: AttrSet -> lambda

Renders a project as an argument that can be passed to withPackages

Evaluates PEP-508 environment markers to select correct dependencies for the platform but does not validate version constraints. For validation see lib.validators.

structured function argument

: project

: Project metadata as returned by lib.project.loadPyproject

python

: Python derivation

extras

: Python extras (optionals) to enable

extraPackages

: Extra withPackages function

::: {.example #function-library-example-lib.renderers.withPackages}

lib.renderers.withPackages usage example

# withPackages (lib.project.loadPyproject { ... })
  «lambda @ «string»:1:1»

:::

lib.renderers.buildPythonPackage

Type: buildPythonPackage :: AttrSet -> AttrSet

Renders a project as an argument that can be passed to buildPythonPackage/buildPythonApplication.

Evaluates PEP-508 environment markers to select correct dependencies for the platform but does not validate version constraints. For validation see lib.validators.

structured function argument

: project

: Project metadata as returned by lib.project.loadPyproject

python

: Python derivation

extras

: Python extras (optionals) to enable

extrasAttrMappings

: Map a Python extras group name to a Nix attribute set like: { dev = "checkInputs"; } This is intended to be used with optionals such as test dependencies that you might want to add to checkInputs instead of propagatedBuildInputs

format

: Which package format to pass to buildPythonPackage If the format is "wheel" PEP-518 build-systems are excluded from the build.

::: {.example #function-library-example-lib.renderers.buildPythonPackage}

lib.renderers.buildPythonPackage usage example

# buildPythonPackage { project = lib.project.loadPyproject ...; python = pkgs.python3;  }
  { pname = "blinker"; version = "1.3.3.7"; propagatedBuildInputs = [ ]; }

:::