mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
93 lines
1.6 KiB
Nix
93 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
buildPackages,
|
|
|
|
# build-system
|
|
maturin,
|
|
|
|
# dependencies
|
|
nexusrpc,
|
|
protobuf,
|
|
types-protobuf,
|
|
typing-extensions,
|
|
|
|
# nativeBuildInputs
|
|
cargo,
|
|
rustc,
|
|
|
|
# passthru
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "temporalio";
|
|
version = "1.23.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "temporalio";
|
|
repo = "sdk-python";
|
|
tag = version;
|
|
fetchSubmodules = true;
|
|
hash = "sha256-AV9kpy6EpfwLm3yx+xf9PRUcti+KJsOizPsf6YqIYws=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
cargoRoot
|
|
;
|
|
hash = "sha256-uVSC4CPuoDw1JuZ6sCTErre1gYBov70qSvD4tQqKvl0=";
|
|
};
|
|
|
|
cargoRoot = "temporalio/bridge";
|
|
|
|
build-system = [
|
|
maturin
|
|
];
|
|
|
|
env.PROTOC = "${lib.getExe buildPackages.protobuf}";
|
|
|
|
dependencies = [
|
|
nexusrpc
|
|
protobuf
|
|
types-protobuf
|
|
typing-extensions
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cargo
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
rustc
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"temporalio"
|
|
"temporalio.bridge.temporal_sdk_bridge"
|
|
"temporalio.client"
|
|
"temporalio.worker"
|
|
];
|
|
|
|
passthru = {
|
|
tests = { inherit (nixosTests) temporal; };
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
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
|
|
];
|
|
};
|
|
}
|