From b467610db618b0dbfcc88bc61fbe3eeefbdca531 Mon Sep 17 00:00:00 2001 From: PerchunPak Date: Sun, 17 Nov 2024 02:03:42 +0100 Subject: [PATCH] python3Packages.inject: init at 5.2.1 --- .../python-modules/inject/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/inject/default.nix diff --git a/pkgs/development/python-modules/inject/default.nix b/pkgs/development/python-modules/inject/default.nix new file mode 100644 index 0000000000000..20c1a2d3395c4 --- /dev/null +++ b/pkgs/development/python-modules/inject/default.nix @@ -0,0 +1,43 @@ +{ + buildPythonPackage, + fetchFromGitHub, + hatch-vcs, + hatchling, + lib, + nix-update-script, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "inject"; + version = "5.2.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ivankorobkov"; + repo = "python-inject"; + rev = "refs/tags/v${version}"; + hash = "sha256-Ws296ESjb+a322imiRRWTS43w32rJc/7Y//OBQXOwnw="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "inject" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Python dependency injection framework"; + homepage = "https://github.com/ivankorobkov/python-inject"; + changelog = "https://github.com/ivankorobkov/python-inject/blob/${version}/CHANGES.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ perchun ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b9010ea5411db..27e56d5cfedb2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6235,6 +6235,8 @@ self: super: with self; { iniparse = callPackage ../development/python-modules/iniparse { }; + inject = callPackage ../development/python-modules/inject { }; + injector = callPackage ../development/python-modules/injector { }; inkbird-ble = callPackage ../development/python-modules/inkbird-ble { };