depot/third_party/nixpkgs/pkgs/development/python-modules/injector/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

39 lines
817 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, typing-extensions
, pytestCheckHook
, pytest-cov
}:
buildPythonPackage rec {
pname = "injector";
version = "0.21.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "python-injector";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-5O4vJSXfYNTrUzmv5XuT9pSUndNSvTZTxfVwiAd+0ck=";
};
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
pytest-cov
];
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;
};
}