Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / injector / default.nix
blob1f15e496f5cc4455ef15a1d5e52828c2b41e567b
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , typing-extensions
6 , pytestCheckHook
7 , pytest-cov
8 }:
10 buildPythonPackage rec {
11   pname = "injector";
12   version = "0.21.0";
13   format = "setuptools";
15   src = fetchFromGitHub {
16     owner = "python-injector";
17     repo = pname;
18     rev = "refs/tags/${version}";
19     hash = "sha256-5O4vJSXfYNTrUzmv5XuT9pSUndNSvTZTxfVwiAd+0ck=";
20   };
22   propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
23     typing-extensions
24   ];
26   nativeCheckInputs = [
27     pytestCheckHook
28     pytest-cov
29   ];
31   pythonImportsCheck = [ "injector" ];
33   meta = with lib; {
34     description = "Python dependency injection framework, inspired by Guice";
35     homepage = "https://github.com/alecthomas/injector";
36     maintainers = [ maintainers.ivar ];
37     license = licenses.bsd3;
38   };