2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
typing-extensions,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-cov,
|
2023-08-10 07:59:29 +00:00
|
|
|
}:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "injector";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "0.21.0";
|
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-injector";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-5O4vJSXfYNTrUzmv5XuT9pSUndNSvTZTxfVwiAd+0ck=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ typing-extensions ];
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-cov
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "injector" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python dependency injection framework, inspired by Guice";
|
|
|
|
homepage = "https://github.com/alecthomas/injector";
|
|
|
|
maintainers = [ maintainers.ivar ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|