From 1652f6d6f9a77140e459ae68d030a11f0cc0ce8b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 Aug 2026 12:32:40 +0200 Subject: [PATCH] python3Packages.aiothreads: init at 1.1.1 Module to bridge async and thread https://github.com/mosquito/aiothreads --- .../python-modules/aiothreads/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/aiothreads/default.nix diff --git a/pkgs/development/python-modules/aiothreads/default.nix b/pkgs/development/python-modules/aiothreads/default.nix new file mode 100644 index 000000000000..c3ab811f4adb --- /dev/null +++ b/pkgs/development/python-modules/aiothreads/default.nix @@ -0,0 +1,50 @@ +{ + lib, + async-timeout, + buildPythonPackage, + fetchFromGitHub, + hatchling, + nix-update-script, + pyprojectVersionPatchHook, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "aiothreads"; + version = "1.1.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "mosquito"; + repo = "aiothreads"; + tag = finalAttrs.version; + hash = "sha256-dK9aDfrIfoFbqq2mvzysy3xAyE/Qhs6cbTmxGzc72hU="; + }; + + build-system = [ hatchling ]; + + nativeBuildInputs = [ pyprojectVersionPatchHook ]; + + nativeCheckInputs = [ + async-timeout + pytest-asyncio + pytest-cov-stub + pytestCheckHook + ]; + + pythonImportsCheck = [ "aiothreads" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Module to bridge async and thread"; + homepage = "https://github.com/mosquito/aiothreads"; + changelog = "https://github.com/mosquito/aiothreads/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 661984726c97..23dc7623b151 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -582,6 +582,8 @@ self: super: with self; { aiotedee = callPackage ../development/python-modules/aiotedee { }; + aiothreads = callPackage ../development/python-modules/aiothreads { }; + aiotools = callPackage ../development/python-modules/aiotools { }; aiotractive = callPackage ../development/python-modules/aiotractive { };