{ lib, buildPackages, buildPythonPackage, cargo, fetchFromGitHub, maturin, pythonOlder, poetry-core, protobuf, python-dateutil, rustc, rustPlatform, setuptools, setuptools-rust, types-protobuf, typing-extensions, }: buildPythonPackage rec { pname = "temporalio"; version = "1.11.0"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "temporalio"; repo = "sdk-python"; rev = "refs/tags/${version}"; hash = "sha256-942EmFOAYUWq58MW2rIVhDK9dHkzi62fUdOudYP94hU="; fetchSubmodules = true; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; sourceRoot = "${src.name}/${cargoRoot}"; hash = "sha256-9hP+zN6jcRmRhPmcZ4Zgp61IeS7gDPfsOvweAxKHnHM="; }; cargoRoot = "temporalio/bridge"; build-system = [ maturin poetry-core ]; preBuild = '' export PROTOC=${buildPackages.protobuf}/bin/protoc ''; dependencies = [ protobuf types-protobuf typing-extensions ] ++ lib.optional (pythonOlder "3.11") python-dateutil; nativeBuildInputs = [ cargo rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook rustc setuptools setuptools-rust ]; pythonImportsCheck = [ "temporalio" "temporalio.bridge.temporal_sdk_bridge" "temporalio.client" "temporalio.worker" ]; meta = { description = "Temporal Python SDK"; homepage = "https://temporal.io/"; changelog = "https://github.com/temporalio/sdk-python/releases/tag/${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ jpds levigross ]; }; }