From 78066a5713003ba86b6a5f7ec72bc2cf6c19b646 Mon Sep 17 00:00:00 2001 From: squat Date: Mon, 13 Apr 2026 12:01:07 +0200 Subject: [PATCH] python3Packages.uncalled-for: init at 0.3.1 uncalled-for is an async dependency injection for Python functions. This introduces a new Python3 package called uncalled-for: https://github.com/chrisguidry/uncalled-for. This library is not especially popular but it is a dependency of fastmcp (https://github.com/prefecthq/fastmcp) v3. [Nixpkgs is still on fastmcp v2](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/fastmcp/default.nix#L48) and cannot be updated to the v3 major version until this dependecy is added to nixpkgs. --- .../python-modules/uncalled-for/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/uncalled-for/default.nix diff --git a/pkgs/development/python-modules/uncalled-for/default.nix b/pkgs/development/python-modules/uncalled-for/default.nix new file mode 100644 index 000000000000..7c426ae9ecce --- /dev/null +++ b/pkgs/development/python-modules/uncalled-for/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatch-vcs, + hatchling, + + # tests + pytest-asyncio, + pytest-cov-stub, + pytest-timeout, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "uncalled-for"; + version = "0.3.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "chrisguidry"; + repo = "uncalled-for"; + tag = finalAttrs.version; + hash = "sha256-+akXLsfto3FNbkpsPPwN1DQmvu3BpTafRbqLmLwtqek="; + }; + + build-system = [ + hatch-vcs + hatchling + ]; + + pythonImportsCheck = [ "uncalled_for" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-cov-stub + pytest-timeout + pytestCheckHook + ]; + + meta = { + description = "Async dependency injection for Python functions"; + homepage = "https://github.com/chrisguidry/uncalled-for"; + changelog = "https://github.com/chrisguidry/uncalled-for/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ squat ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a9dd0eda53f7..200bcff0aba1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20511,6 +20511,8 @@ self: super: with self; { unasync = callPackage ../development/python-modules/unasync { }; + uncalled-for = callPackage ../development/python-modules/uncalled-for { }; + uncertainties = callPackage ../development/python-modules/uncertainties { }; uncompresspy = callPackage ../development/python-modules/uncompresspy { };