diff --git a/pkgs/development/python-modules/mypy-boto3-ebs/default.nix b/pkgs/development/python-modules/mypy-boto3-ebs/default.nix deleted file mode 100644 index 8b22c42f0f7b..000000000000 --- a/pkgs/development/python-modules/mypy-boto3-ebs/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib -, boto3 -, buildPythonPackage -, fetchPypi -, pythonOlder -, typing-extensions -}: - -buildPythonPackage rec { - pname = "mypy-boto3-ebs"; - version = "1.28.36"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-w9OLKJAn9UBnA7x+uedhplSV8plZRYlBpviU9Gv1Ny8="; - }; - - propagatedBuildInputs = [ - boto3 - typing-extensions - ]; - - # Project has no tests - doCheck = false; - - pythonImportsCheck = [ - "mypy_boto3_ebs" - ]; - - meta = with lib; { - description = "Type annotations for boto3.s3"; - homepage = "https://github.com/youtype/mypy_boto3_builder"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ fab ]; - }; -} diff --git a/pkgs/development/python-modules/mypy-boto3-s3/default.nix b/pkgs/development/python-modules/mypy-boto3-s3/default.nix deleted file mode 100644 index 572506275a7c..000000000000 --- a/pkgs/development/python-modules/mypy-boto3-s3/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib -, boto3 -, buildPythonPackage -, cython_3 -, fetchPypi -, pythonOlder -, typing-extensions -}: - -buildPythonPackage rec { - pname = "mypy-boto3-s3"; - version = "1.28.55"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-sAiAn0SOdAdQEtT8VLAXbeC09JvDjjneMMoOdk63UFY="; - }; - - nativeBuildInputs = [ - cython_3 - ]; - - propagatedBuildInputs = [ - boto3 - ] ++ lib.optionals (pythonOlder "3.12") [ - typing-extensions - ]; - - # Project has no tests - doCheck = false; - - pythonImportsCheck = [ - "mypy_boto3_s3" - ]; - - meta = with lib; { - description = "Type annotations for boto3.s3"; - homepage = "https://github.com/youtype/mypy_boto3_builder"; - changelog = "https://github.com/youtype/mypy_boto3_builder/releases/tag/${version}"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ fab ]; - }; -} diff --git a/pkgs/development/python-modules/mypy-boto3/default.nix b/pkgs/development/python-modules/mypy-boto3/default.nix new file mode 100644 index 000000000000..9beda6e1aab5 --- /dev/null +++ b/pkgs/development/python-modules/mypy-boto3/default.nix @@ -0,0 +1,52 @@ +{ lib +, boto3 +, buildPythonPackage +, pythonOlder +, typing-extensions +, fetchPypi +}: +let + toUnderscore = str: builtins.replaceStrings [ "-" ] [ "_" ] str; + + buildMypyBoto3Package = serviceName: version: hash: + buildPythonPackage rec { + pname = "mypy-boto3-${serviceName}"; + inherit version; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version hash; + }; + + propagatedBuildInputs = [ + boto3 + ] ++ lib.optionals (pythonOlder "3.12") [ + typing-extensions + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "mypy_boto3_${toUnderscore serviceName}" + ]; + + meta = with lib; { + description = "Type annotations for boto3 ${serviceName}"; + homepage = "https://github.com/youtype/mypy_boto3_builder"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab mbalatsko ]; + }; + }; +in +rec { + + mypy-boto3-cognito-idp = buildMypyBoto3Package "cognito-idp" "1.28.36" "sha256-pnLO62LZvr4sJsye3gWJROY+xHikSe7dX8erBTRXrPc="; + + mypy-boto3-ebs = buildMypyBoto3Package "ebs" "1.28.36" "sha256-w9OLKJAn9UBnA7x+uedhplSV8plZRYlBpviU9Gv1Ny8="; + + mypy-boto3-s3 = buildMypyBoto3Package "s3" "1.28.55" "sha256-sAiAn0SOdAdQEtT8VLAXbeC09JvDjjneMMoOdk63UFY="; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1004d365de7d..464a6a5922e7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7079,9 +7079,15 @@ self: super: with self; { mypy-boto3-builder = callPackage ../development/python-modules/mypy-boto3-builder { }; - mypy-boto3-ebs = callPackage ../development/python-modules/mypy-boto3-ebs { }; + inherit (callPackage ../development/python-modules/mypy-boto3 { }) - mypy-boto3-s3 = callPackage ../development/python-modules/mypy-boto3-s3 { }; + mypy-boto3-cognito-idp + + mypy-boto3-ebs + + mypy-boto3-s3 + + ; mypy-extensions = callPackage ../development/python-modules/mypy/extensions.nix { };